Achieving a 100x speedup of DELETEs on PostgreSQL
“How did it get late so soon?”
Photo by Murray Campbell on Unsplash
Performance
I recently had a query from a colleague regarding a slow DELETE query on PostgreSQL. On the face of it, it was simple enough. It had no CASCADE, and they were only deleting a few records at a time using a subquery (in the absence of a LIMIT for DELETE). This small batch approach was working, but it was too slow to keep up, resulting in a growing backlog.
Before making any changes, I had a look at the performance to r...
Read more at ivdl.co.za