Does postgres autovaccum's analyze rebuild whole table?
briley last edited by
I could not find an answer for this in postgres docs, even though some DBAs in their blogs claim that manual analyze builds whole table stats and autovacuum updates only incremental stats, but confusion is some DBAs say the opposite.
I understand that autovacuum is the scheduled version of vacuum and analyze based on other parameters we are aware of. Now my question is does autovacuum's analyze rebuilds whole table statistics or just updates the existing statistics(incremental)? Also another question related to same topic is, does "default statistics" value applies to autovacuum analyze as well?
Sajith P Shetty
Autovacuum's analyze does the same thing as manual ANALYZE (of all columns) does. I see nothing in the source code to support that "autovacuum works incremental and manual analyze does full rebuild". "update_attstats" doesn't even look to see who is calling it.
And they handle "default statistics" the same way.