queryinsights.frequently_run_queries (Transact-SQL)
Applies to: SQL analytics endpoint and Warehouse in Microsoft Fabric
The queryinsights.frequently_run_queries
in Microsoft Fabric provides information about frequently run queries in Fabric Data Warehousing.
Column name | Data type | Description |
---|---|---|
last_run_start_time |
datetime2 | Time of the most recent query execution. |
last_run_command |
varchar(8000) | Text of the last query execution. |
number_of_runs |
int | Total number of times the query was executed. |
avg_total_elapsed_time_ms |
int | Average query execution time (ms) across all runs. |
last_run_total_elapsed_time_ms |
int | Time taken by the last execution (ms). |
last_dist_statement_id |
uniqueidentifier | ID linking the query to queryinsights.exec_requests_history . |
last_run_session_id |
smallint | User session ID for the last execution. |
min_run_total_elapsed_time_ms |
int | Shortest query execution time (ms). |
max_run_total_elapsed_time_ms |
int | Longest query execution time (ms). |
number_of_successful_runs |
int | Number of successful query executions. |
number_of_failed_runs |
int | Number of failed query executions. |
number_of_cancelled_runs |
int | Number of canceled query executions. |
Permissions
You should have access to a SQL analytics endpoint or Warehouse within a Premium capacity workspace with Contributor or above permissions.