boca3
Snippet Name: boca3
Tags: helpful,scriptgeneration
Created Date: Oct 1 2021 8:05AM
Last Modified Date: Oct 1 2021 8:05AM
–desc: boca performance activity
Dependencies: none-standalone code
Sample Output:
--desc: boca performance activity
SELECT [ServerRestartedDate],
[LastExecutionTime],
[AverageSeconds],
[TotalExecutions],
[LastElapsedSeconds],
[MaxElapsedSeconds],
--[dbname],
--[QualifiedObjectName],
--[schemaname],
--[objectname],
--[dbid],
--[objectid],
--[number],
--[encrypted],
[text],
[sql_handle],
[statement_start_offset],
[statement_end_offset],
[plan_generation_num],
[plan_handle],
[creation_time],
[last_execution_time],
[execution_count],
[total_worker_time],
[last_worker_time],
[min_worker_time],
[max_worker_time],
[total_physical_reads],
[last_physical_reads],
[min_physical_reads],
[max_physical_reads],
[total_logical_writes],
[last_logical_writes],
[min_logical_writes],
[max_logical_writes],
[total_logical_reads],
[last_logical_reads],
[min_logical_reads],
[max_logical_reads],
[total_clr_time],
[last_clr_time],
[min_clr_time],
[max_clr_time],
[total_elapsed_time],
[last_elapsed_time],
[min_elapsed_time],
[max_elapsed_time],
[query_hash],
[query_plan_hash],
[total_rows],
[last_rows],
[min_rows],
[max_rows],
[statement_sql_handle],
[statement_context_id],
[total_dop],
[last_dop],
[min_dop],
[max_dop],
[total_grant_kb],
[last_grant_kb],
[min_grant_kb],
[max_grant_kb],
[total_used_grant_kb],
[last_used_grant_kb],
[min_used_grant_kb],
[max_used_grant_kb],
[total_ideal_grant_kb],
[last_ideal_grant_kb],
[min_ideal_grant_kb],
[max_ideal_grant_kb],
[total_reserved_threads],
[last_reserved_threads],
[min_reserved_threads],
[max_reserved_threads],
[total_used_threads],
[last_used_threads],
[min_used_threads],
[max_used_threads]
FROM Utility.dbo.[PerformanceActivity]
ORDER BY LastElapsedSeconds DESC