Log slow query plans automatically in the server logs.
Section: EXPLAIN and Plan Analysis
Enable auto_explain
sql
sql
LOAD 'auto_explain';
SET auto_explain.log_min_duration = '200ms';
SET auto_explain.log_analyze = on;Explanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing EXPLAIN and Plan Analysis
EXPLAIN VERBOSE
Include more detail about output columns and active settings.
Keyset pagination
Prefer keyset pagination over deep OFFSET scans for large result sets.
Select needed columns
Avoid fetching unnecessary columns, especially wide rows.