pg_get_top_queries
Retrieve the slowest SQL queries by execution time from pg_stat_statements to identify performance bottlenecks.
Instructions
Get the slowest SQL queries based on execution time from pg_stat_statements (if the extension is enabled).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_get_top_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of slow queries to return. | |
| connectionId | No | Id of the postgres connection to use, from databases.config.yml. Optional when only one postgres connection is configured. |