Explain one query
explain_queryDiagnose slow SQL by retrieving its PostgreSQL execution plan, and enable analyze to run the query read-only and report measured timings and buffer usage.
Instructions
Why THIS statement is slow: the PostgreSQL execution plan for a query you provide. With analyze=true it actually runs the query and reports measured timings and buffer usage (still read-only, still rolled back). Use it on a specific statement; use top_queries to find out which statement to look at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| analyze | No | run the query and report real timings instead of estimates | |
| database | No | which configured database to use; omit when only one is configured |