Retention and archiving
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
plan how long data stays and where it goes.
Planned topics
- Decide retention per table from business and legal needs (orders for years, sessions for days).
- Partitions make it cheap:
DETACH PARTITION, archive to cheaper storage or a file, then drop. - Large
DELETEs create bloat and long locks; avoid them for retention. - Test restoring archived data; archived but unreadable data is lost data.
- Personal data may require deletion on request (privacy rules); plan for both.
Draft outline details
Demonstration
a table: data class / hot period / archive period / method.
Check your understanding
Why is dropping a partition better than DELETE for old data?
Show answer
It is instant, creates no dead rows, and needs no vacuum.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.