Details
-
Bug
-
Resolution: Fixed
-
Low
-
2.7
-
None
Description
Problem
Currently queries like:
select DESCENDENTID from CONFANCESTORS where ANCESTORID = 589828;
require a full table scan, because no index exists on the ancestorid column. On instances with a large number of confancestor entries, this can make various actions such as editing pages very slow.
Workaround
Performance can be improved by doing the following:
- Rebuild the ancestor table
- Run VACUUM CONFANCESTORS; (or equivalent command if not using PostgreSQL)
- Create the index on the ancestorid column by using the following query (for PostgreSQL, should be similar for other databases):
CREATE INDEX confanc_ancestors ON CONFANCESTORS USING btree(ANCESTORID);