Databases · Senior · Question 3 of 75
What is table bloat and what usually causes it?
- 1A table with too many columns
- 2Indexes stored in the same file as the table
- ✓Correct answer: Space taken by dead row versions that isn't reused fast enough, often due to heavy updates with autovacuum lagging or long transactions blocking cleanup
Explanation
Tune autovacuum per table (lower scale factors for hot tables), avoid long transactions, and rebuild bloated objects online with pg_repack or REINDEX CONCURRENTLY.