queryinsights.exec_requests_history (Transact-SQL)
Applies to: SQL analytics endpoint and Warehouse in Microsoft Fabric
The queryinsights.exec_requests_history
in Microsoft Fabric provides information about each completed SQL request.
Column name | Data type | Description |
---|---|---|
distributed_statement_id |
uniqueidentifier | Unique ID for each query. |
start_time |
datetime2 | Time when the query started running. |
command |
varchar(8000) | Complete text of the executed query. |
login_name |
varchar(128) | Name of the user or system that sent the query. |
row_count |
bigint | Number of rows retrieved by the query. |
total_elapsed_time_ms |
int | Total time (ms) taken by the query to finish. |
status |
varchar(30) | Query status: Succeeded, Failed, or Cancelled |
session_id |
smallint | ID linking the query to a specific user session. |
connection_id |
uniqueidentifier | Identification number for the query's connection. Nullable. |
batch_id |
uniqueidentifier | ID for grouped queries (if applicable). Nullable. |
root_batch_id |
uniqueidentifier | ID for the main group of queries (if nested). Nullable. |
query_hash |
varchar(200) | Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to correlate between Query Insight views. For more information, see Query Insights - Aggregation. |
label |
varchar(8000) | Optional label string associated with some SELECT query statements. |
allocated_cpu_time_ms |
bigint | Shows the total time of CPU(s) that was allocated for a query’s execution. |
data_scanned_remote_storage_mb |
bigint | Shows how much data was scanned/read from remote storage (One Lake). |
data_scanned_memory_mb |
bigint | Shows how much data was scanned from local memory. Data scanned from disk and memory together indicates how much data was read from cache. |
data_scanned_disk_mb |
bigint | Shows how much data was scanned/read from local disk. Data scanned from disk and memory together indicates how much data was read from cache. |
Permissions
You should have access to a SQL analytics endpoint or Warehouse within a Premium capacity workspace with Contributor or above permissions.