← Back to Test

Problem 7 - Olympiad

A DBA runs VACUUM FULL on PostgreSQL which rewrites the entire heap and rebuilds all indexes. Afterwards the auto-vacuum daemon still performs routine vacuums. Which statistics are retained across VACUUM FULL and which are reset, affecting the planner’s choice?

Correct: N/A

VACUUM FULL rebuilds the heap so physical row statistics such as n_live_tup are recomputed (reset). However, the planner relies on the pg_statistic catalog which is preserved across VACUUM FULL unless ANALYZE is run again, so the histogram bounds remain intact.