Self-test
Check your understanding
Self-test7 questions
After one UPDATE, the row's ctid moved from (0,1) to (735,41). Why did it move to another page?
Updating every row doubled the table from 5.8 MB to 11.5 MB. Why didn't plain VACUUM shrink it, and what did VACUUM FULL cost?
With fillfactor 100 only 30 of 30,000 updates were HOT; with fillfactor 70, all of them. What makes an update HOT, and what did fillfactor 70 cost?
VACUUM reported 50,000 dead rows that were "not yet removable". What was holding them, and what removed the obstacle?
Why did pg_stat_user_tables report 100,000 dead rows for a 50,000-row delete, and which number should you trust?
What is TOAST, and why does it matter for a table with large text columns?
- Design question
A busy table keeps growing although autovacuum runs every few minutes and reports success. List the causes you would check, in order, and the query for each.