Database · Medium
How do you archive and purge old data without killing production?
DatabasePerformanceStaff
Answer preview
Deleting hundreds of millions of rows with one DELETE locks the table, generates massive WAL, and bloats the table. Archive to cold storage first, then purge in batches or drop partitions.…