Postgres DELETE Can Actualy Scale
Case study 7 min +70 XP
Postgres DELETE can scale for data retention if you design around MVCC churn, cache locality and dead tuples.
Postgres DELETE can scale for data retention if you design around MVCC churn, cache locality and dead tuples.
Postgres SELECT DISTINCT always scans every index entry matching its predicates, so its cost grows with total matching rows rather than with the number of distinct values.
Postgres NOTIFY takes a global exclusive lock from commit start through fsync so notifications enqueue in commit order, which serializes every notifying transaction and blocks group commit.