I’m working on a project where I want to have a fixed/consistent amount of data in terms of a specific time period (eg. 365 days). Which approach is more efficient and will cost lesser workload between the two?
- Using a dedicated table and performing VACUUM to delete the oldest data
- Using a materialized view and refresh it to remove the oldest data from the view (incremental refresh wont be possible in my case)