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 complete SQL request.

Column name Data type Description
distributed_statement_id uniqueid 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 Canceled).
session_id smallint ID linking the query to a specific user session.
connection_id uniqueid (nullable) Identification number for the query's connection.
batch_id uniqueid (nullable) ID for grouped queries (if applicable).
root_batch_id uniqueid (nullable) ID for the main group of queries (if nested).


You should have access to a SQL analytics endpoint or Warehouse within a Premium capacity workspace with Contributor or above permissions.

Next step