And I would absolutely crank up autovacuum and analyze settings. Turn up
the cost limits, turn down the cost delays, decrease the scale factor.
Whatever you need to do such that autovacuum runs often. No need to
schedule a manual vacuum at all. Just don't wait until 20% of the table is
dead before an autovacuum is triggered like the default behavior. The cost
to gather new stats and do garbage collection is rather minimal compared to
the benefit to queries that rely on the data in many cases.

Reply via email to