Skip to content

Commit 2a20a5d

Browse files
20251112 queryinsights.sql_pool_insights (#35825)
* 20251118 queryinsights.sql_pool_insights * 20251118 queryinsights.sql_pool_insights
1 parent 840f63a commit 2a20a5d

6 files changed

Lines changed: 118 additions & 10 deletions

docs/relational-databases/system-views/queryinsights-exec-requests-history-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "The queryinsights.exec_requests_history in Microsoft Fabric provid
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: mariyaali, randolphwest, emtehran
7-
ms.date: 11/05/2025
7+
ms.date: 11/12/2025
88
ms.service: sql
99
ms.topic: "reference"
1010
ms.custom:
@@ -24,7 +24,7 @@ monikerRange: "=fabric"
2424

2525
[!INCLUDE [Fabric SE DW](../../includes/applies-to-version/fabric-se-dw.md)]
2626

27-
The `queryinsights.exec_requests_history` in [!INCLUDE [fabric](../../includes/fabric.md)] provides information about each completed SQL request.
27+
The `queryinsights.exec_requests_history` in [!INCLUDE [fabric](../../includes/fabric.md)] Data Warehouse provides information about each completed SQL request.
2828

2929
| Column name | Data type | Description |
3030
| --- | --- | --- |

docs/relational-databases/system-views/queryinsights-exec-sessions-history-transact-sql.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "The queryinsights.exec_sessions_history in Microsoft Fabric provid
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: mariyaali
7-
ms.date: 10/06/2025
7+
ms.date: 11/18/2025
88
ms.service: sql
99
ms.topic: "reference"
1010
f1_keywords:
@@ -32,8 +32,8 @@ monikerRange: "=fabric"
3232
| `session_end_time` | **datetime2** | Time when the session was disconnected. Sessions that have not completed at the time this view is queried are shown with a value of `1900-01-01`.|
3333
| `program_name` | **varchar(128)** | Name of client program that initiated the session. The value is `NULL` for internal sessions. Is nullable. |
3434
| `login_name` | **varchar(128)** | Login name under which the session is currently executing. It is not nullable. |
35-
| `status` | **varchar(30)** | Status of the session. Values:<br />**Succeeded** - Session has completed successfully<br />**Killed** - Session was killed by a user<br />**Failed** - Session failed due to exceptions.<br />Is not nullable. |
36-
| `context_info` | **varbinary(128)** | `CONTEXT_INFO` value for the session. The context information is set by the user with [SET CONTEXT_INFO](/sql/t-sql/statements/set-context-info-transact-sql?view=azure-sqldw-latest&preserve-view=true). Is nullable. |
35+
| `status` | **varchar(30)** | Status of the session. Values:<br />**Succeeded** - Session completed successfully<br />**Killed** - Session was killed by a user<br />**Failed** - Session failed due to exceptions.<br />Is not nullable. |
36+
| `context_info` | **varbinary(128)** | `CONTEXT_INFO` value for the session. The user can set the context information with [SET CONTEXT_INFO](/sql/t-sql/statements/set-context-info-transact-sql?view=azure-sqldw-latest&preserve-view=true). Is nullable. |
3737
| `total_query_elapsed_time_ms` | **int** | Total time, in milliseconds, for which the session (requests within) was scheduled/executed for execution. It is not nullable. |
3838
| `last_request_start_time` | **datetime2** | Time at which the last request on the session began, including the currently executing request. It is not nullable. |
3939
| `last_request_end_time` | **datetime2** | Time of the last completion of a request on the session. Is nullable. |
@@ -72,7 +72,9 @@ You should have access to a [[!INCLUDE [fabric-se](../../includes/fabric-se.md)]
7272
7373
## Related content
7474

75-
- [Monitoring connections, sessions, and requests using DMVs in Microsoft Fabric](/fabric/data-warehouse/monitor-using-dmv)
75+
- [Query insights in Fabric data warehousing](/fabric/data-warehouse/query-insights)
76+
- [Monitor connections, sessions, and requests using DMVs](/fabric/data-warehouse/monitor-using-dmv)
7677
- [queryinsights.exec_requests_history (Transact-SQL)](queryinsights-exec-requests-history-transact-sql.md)
77-
- [queryinsights.long_running_queries (Transact-SQL)](queryinsights-long-running-queries-transact-sql.md)
7878
- [queryinsights.frequently_run_queries (Transact-SQL)](queryinsights-frequently-run-queries-transact-sql.md)
79+
- [queryinsights.long_running_queries (Transact-SQL)](queryinsights-long-running-queries-transact-sql.md)
80+
- [queryinsights.sql_pool_insights (Transact-SQL)](queryinsights-sql-pool-insights-transact-sql.md)

docs/relational-databases/system-views/queryinsights-frequently-run-queries-transact-sql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ You should have access to a [[!INCLUDE [fabric-se](../../includes/fabric-se.md)]
4949
5050
## Related content
5151

52-
- [Monitoring connections, sessions, and requests using DMVs in Microsoft Fabric](/fabric/data-warehouse/monitor-using-dmv)
52+
- [Query insights in Fabric data warehousing](/fabric/data-warehouse/query-insights)
53+
- [Monitor connections, sessions, and requests using DMVs](/fabric/data-warehouse/monitor-using-dmv)
5354
- [queryinsights.exec_sessions_history (Transact-SQL)](queryinsights-exec-sessions-history-transact-sql.md)
54-
- [queryinsights.long_running_queries (Transact-SQL)](queryinsights-long-running-queries-transact-sql.md)
5555
- [queryinsights.exec_requests_history (Transact-SQL)](queryinsights-exec-requests-history-transact-sql.md)
56+
- [queryinsights.long_running_queries (Transact-SQL)](queryinsights-long-running-queries-transact-sql.md)
57+
- [queryinsights.sql_pool_insights (Transact-SQL)](queryinsights-sql-pool-insights-transact-sql.md)

docs/relational-databases/system-views/queryinsights-long-running-queries-transact-sql.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ ORDER BY median_total_elapsed_time_ms DESC;
5858
5959
## Related content
6060

61-
- [Monitoring connections, sessions, and requests using DMVs in Fabric Data Warehouse](/fabric/data-warehouse/monitor-using-dmv)
61+
- [Query insights in Fabric data warehousing](/fabric/data-warehouse/query-insights)
62+
- [Monitor connections, sessions, and requests using DMVs](/fabric/data-warehouse/monitor-using-dmv)
6263
- [queryinsights.exec_sessions_history (Transact-SQL)](queryinsights-exec-sessions-history-transact-sql.md)
6364
- [queryinsights.exec_requests_history (Transact-SQL)](queryinsights-exec-requests-history-transact-sql.md)
6465
- [queryinsights.frequently_run_queries (Transact-SQL)](queryinsights-frequently-run-queries-transact-sql.md)
66+
- [queryinsights.sql_pool_insights (Transact-SQL)](queryinsights-sql-pool-insights-transact-sql.md)
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "queryinsights.sql_pool_insights (Transact-SQL)"
3+
description: The queryinsights.sql_pool_insights in Microsoft Fabric provides actionable insights into the configuration and utilization of SQL pools.
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: mariyaali
7+
ms.date: 11/12/2025
8+
ms.service: sql
9+
ms.topic: reference
10+
f1_keywords:
11+
- "queryinsights.sql_pool_insights"
12+
- "queryinsights.sql_pool_insights_TSQL"
13+
helpviewer_keywords:
14+
- "queryinsights.sql_pool_insights system view"
15+
- "queryinsights.sql_pool_insights"
16+
- "query insights sql_pool_insights"
17+
- "SQL pools"
18+
dev_langs:
19+
- TSQL
20+
monikerRange: "=fabric"
21+
---
22+
# queryinsights.sql_pool_insights (Transact-SQL)
23+
24+
[!INCLUDE [Fabric SE DW](../../includes/applies-to-version/fabric-se-dw.md)]
25+
26+
The `queryinsights.sql_pool_insights` in [!INCLUDE [fabric](../../includes/fabric.md)] Data Warehouse monitors resource allocation, tracks configuration changes, and identify periods when pools are under pressure.
27+
28+
| Column name | Data type | Description |
29+
| --- | --- | --- |
30+
| `sql_pool_name` | **nvarchar(128)**| Name of the SQL pool. |
31+
| `timestamp` | **datetime2** | Timestamp when the health check or capacity change took place. |
32+
| `max_resource_percentage` | **int** | Maximum resource percentage allocated to the pool. |
33+
| `is_optimized_for_reads` | **bit** | Indicates if the pool is configured for read-optimized workloads. |
34+
| `current_workspace_capacity` | **nvarchar(16)**| Capacity currently used by the workspace. |
35+
| `is_pool_under_pressure` | **bit** | Indicates if the pool is under pressure. |
36+
37+
## Remarks
38+
39+
In Fabric Data Warehouse, resource isolation is enforced between `SELECT` and `NON SELECT` pools, preventing contention. Two pools are present by default:
40+
41+
- `SELECT`: Handles read (`SELECT`) queries, optimized for analytics/reporting.
42+
- `NON SELECT` Handles data modification (`INSERT`, `UPDATE`, `DELETE`), optimized for ETL/ingestion.
43+
44+
### Event-based reporting
45+
46+
- New records are logged when pool configuration, workspace capacity, or pressure state changes.
47+
- Pressure state changes are logged if the pressure is sustained for **1 minute** or longer.
48+
- Events are only logged when the warehouse is active. If there is no activity on the warehouse, periodic events are paused and resume once activity is detected. This means that during periods of inactivity, there can be gaps in event logging until the warehouse becomes active again.
49+
50+
## Permissions
51+
52+
You should have access to a SQL analytics endpoint or warehouse within a Fabric Capacity workspace with Contributor or above permissions or Viewer with Monitor permissions.
53+
54+
## Examples
55+
56+
Use this view to correlate query performance issues with pool pressure and configuration changes. Visualize periods of pressure using window functions or external tools. Some examples follow:
57+
58+
### A. Periods of pressure in the last 24 hours
59+
60+
Show periods when the `SELECT` pool was under pressure in the last 24 hours:
61+
62+
```sql
63+
-- Show periods when the SELECT pool was under pressure in the last 24 hours
64+
SELECT sql_pool_name, timestamp, is_pool_under_pressure
65+
FROM queryinsights.sql_pool_insights
66+
WHERE sql_pool_name = 'SELECT'
67+
AND timestamp >= DATEADD(hour, -24, GETDATE())
68+
AND is_pool_under_pressure = 1
69+
ORDER BY timestamp DESC;
70+
```
71+
72+
### B. Visualize pressure trends
73+
74+
Calculate consecutive pressure periods and gaps using window functions:
75+
76+
```sql
77+
-- Calculate consecutive pressure periods and gaps using window functions
78+
SELECT sql_pool_name,
79+
timestamp,
80+
is_pool_under_pressure,
81+
LAG(timestamp) OVER (PARTITION BY sql_pool_name ORDER BY timestamp) AS previous_event,
82+
DATEDIFF(minute, LAG(timestamp) OVER (PARTITION BY sql_pool_name ORDER BY timestamp), timestamp) AS minutes_since_last_event
83+
FROM queryinsights.sql_pool_insights
84+
WHERE sql_pool_name = 'SELECT'
85+
ORDER BY timestamp;
86+
```
87+
88+
## Next step
89+
90+
> [!div class="nextstepaction"]
91+
> [Query insights in Microsoft Fabric](/fabric/data-warehouse/query-insights)
92+
93+
## Related content
94+
95+
- [Query insights in Fabric data warehousing](/fabric/data-warehouse/query-insights)
96+
- [Monitor connections, sessions, and requests using DMVs](/fabric/data-warehouse/monitor-using-dmv)
97+
- [queryinsights.exec_requests_history (Transact-SQL)](queryinsights-exec-requests-history-transact-sql.md)
98+
- [queryinsights.exec_sessions_history (Transact-SQL)](queryinsights-exec-sessions-history-transact-sql.md)
99+
- [queryinsights.long_running_queries (Transact-SQL)](queryinsights-long-running-queries-transact-sql.md)
100+
- [queryinsights.frequently_run_queries (Transact-SQL)](queryinsights-frequently-run-queries-transact-sql.md)

docs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11556,6 +11556,8 @@ items:
1155611556
href: relational-databases/system-views/queryinsights-frequently-run-queries-transact-sql.md
1155711557
- name: queryinsights.long_running_queries
1155811558
href: relational-databases/system-views/queryinsights-long-running-queries-transact-sql.md
11559+
- name: queryinsights.sql_pool_insights
11560+
href: relational-databases/system-views/queryinsights-sql-pool-insights-transact-sql.md
1155911561
- name: Object
1156011562
href: relational-databases/system-catalog-views/object-catalog-views-transact-sql.md
1156111563
items:

0 commit comments

Comments
 (0)