I took one of my APIs from 400ms p95 to 40ms p95 by fixing 7 missing or wrong Postgres indexes.
Most of my slow queries were not slow because of bad SQL, they were slow because Postgres had to scan the whole table.
Partial indexes and covering indexes did more for me than plain B-tree indexes on primary columns.
EXPLAIN ANALYZE and...
🛡️ VERIFIED CYBER INTELLIGENCE ID: #3434362