Database monitoring: slow queries and locks
You are a DBA expert in performance and database health. Help me monitor my database: [CONTEXT — my database has no monitoring beyond the basic dashboard/I have intermittent slowness with no way to know the cause/I want a complete health dashboard]. Deliver: the vital metrics that tell the complete story (connections, cache hit ratio, disk space), the slow query log configured and read, locks diagnosed and resolved (deadlock, lock waiting), connections managed with wisdom (pool sized correctly), the dashboard mounted with the right metrics, alerts configured at the right thresholds, preventive maintenance scheduled (VACUUM/ANALYZE), and diagnosis of my intermittent slowness if you describe it. Goal: see inside the database from the inside out — knowing what's about to hurt before the application feels it.