How to Stop Analyze in PostgreSQL Auto Vaccume

1.9k views Asked by At

Auto Vacuum executes Vacuum and Analyze when the threshold is exceeded. The threshold values are as follows:

  • autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * rows
  • autovacuum_analyze_threshold + autovacuum_analyze_scale_factor * rows

In PostgreSQL, is there a way to stop Analyze while keeping Auto Vacuum's Vacuum running automatically?

1

There are 1 answers

2
Laurenz Albe On

The best you can do is set autovacuum_analyze_scale_factor to its maximum 100 for that table, then it will only be analyzed once 100 times as many rows have been modified as are in the table.

But it is not a smart idea to disable autoanalyze, and you shouldn't do it.