Matthew T. O'Connor wrote:
Two questions: 1) It is my understanding that these new GUC vars only effect vacuum. That is they do NOT have any effect on an analyze command right? (I ask since I'm only setting the vars before I issue a vacuum command)
No, vacuum also affects analyze alone (cvs tip here): (2.5 seconds -> 50 seconds)
test=# SET vacuum_cost_delay TO 0; SET Time: 0.308 ms test=# analyze; ANALYZE Time: 2591.259 ms test=# SET vacuum_cost_delay TO 10; SET Time: 0.309 ms test=# analyze; ANALYZE Time: 51737.896 ms
And it seems it affects analyze much more than vacuum, at least if there is *nothing* to vacuum... (2 seconds -> 8 seconds)
test=# SET vacuum_cost_delay TO 0; SET Time: 0.261 ms test=# VACUUM; VACUUM Time: 1973.137 ms test=# SET vacuum_cost_delay TO 10; SET Time: 0.236 ms test=# vacuum; VACUUM Time: 7966.085 ms
I suggest you also issue the SET commands for analyze also. ISTM that there is also no distinction between VACUUM and VACUUM FULL, but I think pg_autovacuum never does a vacuum full, so there is no problem with that.
Best Regards,
Michael Paesold
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend