Welcome to a new post on the Coyote Monitor blog. If you’re here, chances are someone has told you “the application is slow” and you’ve found yourself staring at the server with no idea which query to look at first.
We’ll start with how to find slow queries in SQL Server using the tools you already have, and then introduce Slow Queries, the new Coyote Monitor dashboard. It doesn’t just tell you which queries are the problem: it analyzes their execution plan and proposes how to optimize them. A heads-up: the dashboard is in Beta, and your feedback helps us a lot.
How do you find slow queries in SQL Server without external tools?
The classic route is the sys.dm_exec_query_stats DMV, which accumulates execution statistics for the queries in the plan cache. This script lists the top 20 by average CPU per execution; change the ORDER BY to sort by duration, reads or execution count:
SELECT TOP (20)
DB_NAME(st.dbid) AS database_name,
qs.execution_count,
qs.total_worker_time / qs.execution_count / 1000 AS avg_cpu_ms,
qs.total_elapsed_time / qs.execution_count / 1000 AS avg_duration_ms,
qs.total_logical_reads / qs.execution_count AS avg_logical_reads,
SUBSTRING(st.text,
(qs.statement_start_offset / 2) + 1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END - qs.statement_start_offset) / 2) + 1) AS statement_text,
qp.query_plan
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp
ORDER BY avg_cpu_ms DESC;
One thing to watch: for ad hoc queries, database_name can come back as NULL. And if you’re on SQL Server 2016 or later (or Azure SQL), Query Store persists these statistics inside the database itself. Official docs: sys.dm_exec_query_stats and Query Store on Microsoft Learn.
Which metric should you sort by?
Not every “slow” query is slow for the same reason:
- High CPU on the server: sort by CPU.
- Users complaining: sort by duration.
- High logical reads: these often point to missing indexes.
- Constant load but no obviously slow query: look at execution count. A cheap query fired thousands of times can weigh more than an expensive one that runs rarely.
The problem with relying on scripts alone
For a single instance and an experienced DBA, a script may be all you need. But real limitations show up:
- You get numbers, not a diagnosis. To understand why a query costs so much, you have to open the XML plan and know how to read it.
- It takes experience. Not everyone on the team can interpret execution plans.
- It doesn’t scale. Running and reviewing the script on 5, 10 or 50 instances isn’t realistic.
- You can’t prioritize by room for improvement. The slowest query isn’t always the one that would give you the biggest gain.
That’s where Slow Queries comes in.
What is the Slow Queries dashboard in Coyote Monitor?
Slow Queries shows the queries on an instance that Coyote Monitor has analyzed and found room for improvement in. It’s available for SQL Server, Azure SQL Database, Azure SQL Managed Instance, Fabric SQL Database and Amazon RDS for SQL Server.
You use it in two steps: pick the sort metric, the dashboard lists the 20 most relevant queries, and when you select one you get its full detail.

Seven ways to sort
The Sort By bar offers seven metrics: Score, CPU Time, Logical Reads, Logical Writes, Physical Reads, Duration and Executions. CPU, reads, writes and duration are averages per execution.
Score deserves a closer look: it starts at 1 and adds one point for each type of problem detected in the plan (missing indexes, lookups, scans, TempDB spills, implicit conversions, parallelism…). Based on it, each query gets an improvement level:
| Level | Score | Meaning |
|---|---|---|
| HIGH | Above 8 | Where you can gain the most performance. |
| MEDIUM | 4 to 8 | Noticeable improvement, no rush. |
| LOW | Below 4 | Limited impact, deal with it when you have time. |
The detail of each query
When you select a query, the dashboard shows four blocks, each with its own Copy button:
- Original Query: the text as it runs on the server, formatted and syntax-highlighted.
- AI Documented Query: the same query with comments explaining what each part does.
- AI Optimized Query: a proposed rewrite designed to run better.
- Recommendations: concrete suggested actions.
The header also shows the estimated improvement if you apply the optimization, along with the query’s six metrics.

The execution plan viewer
The View Execution Plan button opens the plan full screen. Plan Insights summarizes general data, missing index suggestions (with improvement percentage and columns) and plan warnings.
In the diagram, each operator shows its cost relative to the most expensive operator in the plan. Red nodes (over 50%) are the first place to look: an expensive Scan next to a missing index suggestion usually means the right index would cut the work dramatically. You can also copy the plan XML.

How does Slow Queries generate its optimization proposals?
The analysis starts from the query and its execution plan, and it’s generated by an AI system. Under the hood, two different models are used, and which one runs depends on the complexity of the query. That’s what makes confidence in the results high.
Even so, as with anything AI produces, the rule is the same: test first. The proposals save you a good chunk of the work, but validating them before they reach production is up to you.
What I recommend when validating them:
- Run the optimized query in a test environment and compare plan and timings against the original.
- Before creating a new index, check its maintenance cost: it speeds up reads but slows down writes.
- If the change affects application code, share it with the development team.
Frequently asked questions about slow queries and Slow Queries
How do you find slow queries in SQL Server?
You can query the sys.dm_exec_query_stats DMV or Query Store and sort by CPU, duration or reads. With a monitoring tool like Coyote Monitor, the Slow Queries dashboard directly lists the 20 top queries for each metric, already analyzed.
What is Slow Queries in Coyote Monitor?
It’s a Coyote Monitor dashboard that shows the queries on an instance with room for improvement, including their execution plan, recommendations and an AI-generated optimized version of the query.
Which SQL Server monitoring tool suggests optimized queries?
Coyote Monitor does, through Slow Queries: it documents the original query, proposes an optimized version and estimates the expected improvement.
How do you know which query to optimize first?
By its Score, which adds one point for each type of problem detected in the plan. Above 8 is high priority, 4 to 8 is medium, and below 4 is low.
Which platforms does it work with?
SQL Server, Azure SQL Database, Azure SQL Managed Instance, Fabric SQL Database and Amazon RDS for SQL Server.
Can I try Slow Queries for free?
Yes. Coyote Monitor offers a 30-day free trial on one instance. The full documentation is in the dashboard wiki.
Try it on your own environment
Start with the 30-day free trial or request a demo and we’ll show you Slow Queries on a real case. And if you have feedback on the Beta, we’d love to hear it.