From: | Robert Leach <rleach(at)princeton(dot)edu> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18177: certain queries under certain contexts take multiple orders of magnitude longer compared to v10 |
Date: | 2023-11-06 18:22:52 |
Message-ID: | BDBE80B4-8F45-4501-B261-CDC140B0CFD9@princeton.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
> Perhaps more aggressive autovacuum settings could help, but we've not gotten far enough to tell yet.
Well, I can report that changing the autovacuum settings does indeed help. I added this to all of the `setUpClass` methods of our test code:
ALTER TABLE "DataRepo_peakdata" SET (autovacuum_vacuum_scale_factor = 0.0);
ALTER TABLE "DataRepo_peakdata" SET (autovacuum_vacuum_threshold = 5000);
ALTER TABLE "DataRepo_peakdata" SET (autovacuum_analyze_scale_factor = 0.0);
ALTER TABLE "DataRepo_peakdata" SET (autovacuum_analyze_threshold = 5000);
The one query I've been testing with reproducibly runs in a fraction of a second and when I run the entire test suite on github, it runs in 33 minutes as opposed to an hour, which is close to on par with how it was running in postgres 10.
It's also notable that I have not been able to get this speed improvement using a `VACUUM FULL ANALYZE`, though I can't be sure I ever did it correctly in the first place.
The above was based on the feedback you guys provided and the following blog post:
https://www.lob.com/blog/supercharge-your-postgresql-performance
I still don't like the fact that we have this database-architecture-specific code in our code-base that ties it to a specific database. I'm not sure if where I put it is the best place for it either. Is there a config file I can put these settings in?
And I'm still curious why this wasn't necessary in postgres 10?
Rob
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-11-06 22:38:07 | Re: BUG #18177: certain queries under certain contexts take multiple orders of magnitude longer compared to v10 |
Previous Message | PG Bug reporting form | 2023-11-06 15:02:29 | BUG #18185: Error when calling whoami at the beginning of the installation |