by jashmatthews · 2y ago · 0 comments
Deleting older rows is a nightmare at scale. It leaves holes in the earlier parts of the table and nerfs half the advantage of using append-only in the first place. You end up paying 8kb page IO costs for a single job.
Dedicated queues have constant time operations for enqueue and dequeue which don't blow up at random times.
They can also help to mitigate io issues if you use your insertion timestamp as the partition key and include it in your main queries.