Loading lesson…
Level 1 · Apprentice0 XP
Keep a table with billions of rows fast and maintainable.
Step 1 / 6
ProblemAn events table grows by 50 million rows a month. Deleting old rows takes hours and locks things up, indexes no longer fit in memory, and VACUUM never finishes.
← → step
Before this: PostgreSQL superpowers
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Convert an events table to monthly partitions, create partitions ahead automatically with pg_partman or pg_cron, and write a retention job that detaches and drops partitions older than 13 months.