queryinsights.long_running_queries (Transact-SQL)
Applies to: SQL analytics endpoint and Warehouse in Microsoft Fabric
The queryinsights.long_running_queries
in Microsoft Fabric provides information about SQL query execution times.
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. |
median_total_elapsed_time_ms | int | Median query execution time (ms) across runs. |
number_of_runs | int | Total number of times the query was executed. |
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. |
Permissions
You should have access to a SQL analytics endpoint or Warehouse within a Premium capacity workspace with Contributor or above permissions.
Related content
- Monitoring connections, sessions, and requests using DMVs in Microsoft Fabric
- queryinsights.exec_requests_history (Transact-SQL)
- queryinsights.frequently_run_queries (Transact-SQL)
Next step
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for