Slowest statements server-wide
top_queriesIdentify the most expensive SQL queries by total execution time across the server. Uses pg_stat_statements; if missing, provides enablement instructions and directs to explain_query for detailed plans.
Instructions
WHICH statements cost the most, ranked by total execution time across the whole server. Requires the pg_stat_statements extension; if it is missing the answer says how to enable it. Take the statement you find here to explain_query for the plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| database | No | which configured database to use; omit when only one is configured |