get_top_queries
Retrieves slow or resource-intensive queries from pg_stat_statements. Rank by total time, mean time, or resource usage and adjust result count.
Instructions
Reports the slowest or most resource-intensive queries using data from the 'pg_stat_statements' extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort_by | No | Ranking criteria: 'total_time' for total execution time or 'mean_time' for mean execution time per call, or 'resources' for resource-intensive queries | resources |
| limit | No | Number of queries to return when ranking based on mean_time or total_time |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |