2 ms·
pg_stat_statements is useful, but it isn't completely free, e.g. [1] (admittedly from pg12, which is three major versions ago). Most people should probably lea
by gnfargbl 4y ago
pg_stat_statements is useful, but it isn't completely free, e.g. [1] (admittedly from pg12, which is three major versions ago).
Most people should probably leave it enabled, but if you have a database with a very defined and understood query pattern, then it might be worth running perf and checking if it is costing you.
[1] https://www.alibabacloud.com/blog/postgresql-v12-how-pg-stat-statements-causes-high-concurrency-performance-issues_597790 https://www.alibabacloud.com/blog/postgresql-v12-how-pg-stat...
- hummus_bae 4y agoMost modern processors run at a speed that makes it cheaper to check than to not check. Some people might argue for lower-level optimizations like this, but in this case, I don't think it's a big deal. Bottom line: enabling this doesn't hurt. It might help, and it doesn't cost anything to check