Skip to content

Commit

Permalink
Alaised new sort column. Fixed n column
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceGoding committed Jul 21, 2024
1 parent 3e00059 commit c424a2e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sp_QuickieStore/sp_QuickieStore.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6704,7 +6704,7 @@ FROM
WHEN 'executions' THEN N'qsrs.count_executions'
WHEN 'recent' THEN N'qsrs.last_execution_time'
WHEN 'plan count by hashes' THEN N'hashes.plan_hash_count_for_query_hash DESC, hashes.query_hash'
ELSE N'qsrs.avg_cpu_time_ms'
ELSE CASE WHEN @sort_order_is_a_wait = 1 THEN N'waits.total_query_wait_time_ms' ELSE N'qsrs.avg_cpu_time' END
END + N' DESC
)'
/*
Expand All @@ -6721,7 +6721,7 @@ FROM
, hashes.plan_hash_count_for_query_hash, hashes.query_hash'
WHEN @sort_order_is_a_wait = 1
THEN N'
, waits.total_query_wait_time_ms'
, waits.total_query_wait_time_ms AS total_wait_time_from_sort_order_ms'
ELSE N''
END
)
Expand Down Expand Up @@ -6951,7 +6951,7 @@ FROM
WHEN 'executions' THEN N'qsrs.count_executions'
WHEN 'recent' THEN N'qsrs.last_execution_time'
WHEN 'plan count by hashes' THEN N'hashes.plan_hash_count_for_query_hash DESC, hashes.query_hash'
ELSE N'qsrs.avg_cpu_time_ms'
ELSE CASE WHEN @sort_order_is_a_wait = 1 THEN N'waits.total_query_wait_time_ms' ELSE N'qsrs.avg_cpu_time' END
END + N' DESC
)'
/*
Expand All @@ -6968,7 +6968,7 @@ FROM
, hashes.plan_hash_count_for_query_hash, hashes.query_hash'
WHEN @sort_order_is_a_wait = 1
THEN N'
, waits.total_query_wait_time_ms'
, waits.total_query_wait_time_ms AS total_wait_time_from_sort_order_ms'
ELSE N''
END
)
Expand Down Expand Up @@ -7172,7 +7172,7 @@ FROM
WHEN 'executions' THEN N'qsrs.count_executions'
WHEN 'recent' THEN N'qsrs.last_execution_time'
WHEN 'plan count by hashes' THEN N'hashes.plan_hash_count_for_query_hash DESC, hashes.query_hash'
ELSE N'qsrs.avg_cpu_time_ms'
ELSE CASE WHEN @sort_order_is_a_wait = 1 THEN N'waits.total_query_wait_time_ms' ELSE N'qsrs.avg_cpu_time' END
END + N' DESC
)'
/*
Expand All @@ -7189,7 +7189,7 @@ FROM
, hashes.plan_hash_count_for_query_hash, hashes.query_hash'
WHEN @sort_order_is_a_wait = 1
THEN N'
, waits.total_query_wait_time_ms'
, waits.total_query_wait_time_ms AS total_wait_time_from_sort_order_ms'
ELSE N''
END
)
Expand Down Expand Up @@ -7394,7 +7394,7 @@ FROM
WHEN 'executions' THEN N'qsrs.count_executions'
WHEN 'recent' THEN N'qsrs.last_execution_time'
WHEN 'plan count by hashes' THEN N'hashes.plan_hash_count_for_query_hash DESC, hashes.query_hash'
ELSE N'qsrs.avg_cpu_time_ms'
ELSE CASE WHEN @sort_order_is_a_wait = 1 THEN N'waits.total_query_wait_time_ms' ELSE N'qsrs.avg_cpu_time' END
END + N' DESC
)'
/*
Expand All @@ -7411,7 +7411,7 @@ FROM
, hashes.plan_hash_count_for_query_hash, hashes.query_hash'
WHEN @sort_order_is_a_wait = 1
THEN N'
, waits.total_query_wait_time_ms'
, waits.total_query_wait_time_ms AS total_wait_time_from_sort_order_ms'
ELSE N''
END
)
Expand Down

0 comments on commit c424a2e

Please sign in to comment.