Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-22598

The confancestors table should have an index for lookups by ancestorid

    XMLWordPrintable

Details

    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:

      1. Rebuild the ancestor table
      2. Run VACUUM CONFANCESTORS; (or equivalent command if not using PostgreSQL)
      3. 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);
        

      Attachments

        Activity

          People

            nbhawnani Niraj Bhawnani
            nbhawnani Niraj Bhawnani
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: