Blog Post

Microsoft Blog for PostgreSQL
8 MIN READ

Recovering TPS After a Cross-Database Migration

vinaykumardumpa's avatar
Sep 16, 2026

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.

1. The Investigation A thorough investigation led to the following observations: CPU remained saturated. The server ran at 100% CPU throughout the benchmark, while wait samples showed that most...
Updated Sep 30, 2026
Version 3.0