Skip to content

Instantly share code, notes, and snippets.

@MarkPryceMaherMSFT
Last active March 10, 2026 12:37
Show Gist options
  • Select an option

  • Save MarkPryceMaherMSFT/8ac86364824b208fe97085e112052d16 to your computer and use it in GitHub Desktop.

Select an option

Save MarkPryceMaherMSFT/8ac86364824b208fe97085e112052d16 to your computer and use it in GitHub Desktop.
query-insights exec_requests_history
SELECT [distributed_statement_id],
[database_name],
[submit_time],
[start_time],
[end_time],
[is_distributed],
[statement_type],
[total_elapsed_time_ms],
[login_name],
[row_count],
[status],
[session_id],
[connection_id],
[program_name],
[batch_id],
[root_batch_id],
[query_hash],
[label],
[result_cache_hit],
--[sql_pool_name],
[error_code],
[error_severity],
[error_state],
[allocated_cpu_time_ms],
[data_scanned_remote_storage_mb],
[data_scanned_memory_mb],
[data_scanned_disk_mb],
[command]
FROM [queryinsights].[exec_requests_history]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment