Loading...
Playbook
Identify, analyze, and optimize slow database queries.
PostgreSQL: Show Top Slow Queries
SELECT query, calls, total_time, rows FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10;MySQL: Analyze Query Execution
EXPLAIN FORMAT=JSON SELECT * FROM users WHERE active = 1;Check Table Bloat (Postgres)
SELECT relname, n_dead_tup, last_vacuum FROM pg_stat_user_tables;