The lede: A team moved their workload from another database engine onto Azure Postgres. Functionally, everything was correct, but their benchmarks were only showing a small fraction of the expected TPS. CPU sat at the ceiling, and adding compute scale did not help. The root cause? A single `NOT IN` query was the culprit. Rewriting the query to use `NOT EXISTS` unlocked an anti-join, and an index on the foreign-key column restored throughput.
Updated Sep 30, 2026
Version 3.0