get_expensive_queries
Retrieves resource-intensive SQL queries from Query Store or plan cache, sorted by CPU, reads, writes, duration, or executions for performance troubleshooting.
Instructions
Get the most resource-intensive queries from the query store or plan cache
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": "get_expensive_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Number of queries to return | |
| metric | No | Metric to sort by | cpu |
| server | No | SQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified. |