forked from MasayukiOzawa/SQLServer-Util
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d2d4ea
commit 6d35085
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SELECT | ||
p.query_id, | ||
p.plan_id, | ||
rsi.start_time, | ||
rsi.end_time, | ||
rs.first_execution_time, | ||
rs.last_execution_time, | ||
p.last_execution_time, | ||
rs.avg_dop, | ||
rs.last_dop, | ||
rs.min_dop, | ||
rs.max_dop, | ||
rs.stdev_dop | ||
FROM | ||
sys.query_store_plan AS p | ||
LEFT JOIN | ||
sys.query_store_runtime_stats AS rs | ||
ON | ||
rs.plan_id = p.plan_id | ||
LEFT JOIN | ||
sys.query_store_runtime_stats_interval rsi | ||
ON | ||
rsi.runtime_stats_interval_id = rs.runtime_stats_interval_id | ||
WHERE | ||
is_parallel_plan = 1 | ||
AND | ||
rsi.start_time >= DATEADD(dd, -1, GETUTCDATE()) | ||
ORDER BY | ||
start_time ASC |