good article, thanks for sharing!
I came across your article when I was dealing with another downside with soft deletion which is the potential for lock contention or deadlocks. If an index is created on the deleted_at column, it may cause seemingly narrow queries to hold locks on all the active rows, like any query that specifies WHERE deleted_at IS NULL. This makes any query interested in an active row contend with any other query interested in an active row, even if those queries aren't expected to return the same rows.
good article, thanks for sharing!
I came across your article when I was dealing with another downside with soft deletion which is the potential for lock contention or deadlocks. If an index is created on the
deleted_atcolumn, it may cause seemingly narrow queries to hold locks on all the active rows, like any query that specifiesWHERE deleted_at IS NULL. This makes any query interested in an active row contend with any other query interested in an active row, even if those queries aren't expected to return the same rows.