Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
PuppetDB
-
New Feature
-
-
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.