Skip to content

Commit af39147

Browse files
committed
Create QueryList_withResultSetCacheData.kql
added query that inclues resultSetCaching data
1 parent c99ae9f commit af39147

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//Query List with ResultSetCache data
2+
let databaseName = 'syntheticworkload';
3+
SynapseSqlPoolExecRequests
4+
| where _ResourceId endswith databaseName
5+
| where StatementType !in ('Batch','Execute')
6+
| summarize
7+
Request_ID=any(RequestId),
8+
Submit_Time=min(TimeGenerated),
9+
Start_Time=max(StartTime),
10+
End_Time=max(EndTime),
11+
Command=any(Command),
12+
Status=min(Status), //This works because Completed/Failed/Cancelled are all below running, below suspended. This happens to work out where the min is the current status
13+
Statement_Type=any(StatementType),
14+
Resource_class=any(ResourceClass),
15+
ResultCacheHit=min(ResultCacheHit)
16+
by RequestId
17+
| summarize ResultCacheHit=min(ResultCacheHit),ElapsedTime_min=anyif((End_Time - Start_Time)/1m,Start_Time > ago(30d)),Submit_Time=any(Submit_Time) ,Start_Time=any(Start_Time), End_Time=any(End_Time),Command=any(Command),Status=any(Status),Statement_Type=any(Statement_Type),Resource_class=any(Resource_class) by Request_ID
18+
| order by ElapsedTime_min desc

0 commit comments

Comments
 (0)