Diagnose a PostgreSQL database that has degraded from 2ms to 200ms average query latency, using slow query logs, EXPLAIN plans, index analysis, lock waits, and replication lag investigation.
## Problem
Your PostgreSQL database has degraded from 2ms average query latency to 200ms over the past 3 hours. The application connection pool shows 48 of 50 connections in use. Replication lag to the read replica is growing. Diagnose the root cause and propose both immediate mitigation and long-term fixes.
Sign up to access the full problem
Design canvas, rubric, hints, and model solutions.