Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-4640

Add a file index to catalog_resources for CD4PE Impact Analysis

    XMLWordPrintable

Details

    • PuppetDB
    • New Feature
    • Hide
      If you have the PostgreSQL extension pg_trgm configured, adds an index on the catalog_resources table's file column.

      In a separate release notes entry, we have deprecated running PostgreSQL without the pg_trgm extension
      Show
      If you have the PostgreSQL extension pg_trgm configured, adds an index on the catalog_resources table's file column. In a separate release notes entry, we have deprecated running PostgreSQL without the pg_trgm extension
    • Needs Assessment

    Description

      As seen in CDPE-2850, CD4PE's impact analysis puts a great deal of stress on the catalog_resources table doing selects against the file row. We have seen in customer cases that performance can be greatly improved if an index is added and autovacuum frequency is increased:

      CREATE INDEX catalog_resources_file_idx on catalog_resources USING gin (file gin_trgm_ops) WHERE file IS NOT NULL;
      ALTER TABLE catalog_resources SET (autovacuum_analyze_scale_factor = 0.01);
      ALTER INDEX catalog_resources_file_idx SET (fastupdate=false);
      

      I do not see much downside to these changes being the default.

      Attachments

        Issue Links

          Activity

            People

              austin.blatt Austin Blatt
              adam.bottchen Adam Bottchen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support