Edit

Share via


queryinsights.sql_pool_insights (Transact-SQL)

Applies to: SQL analytics endpoint and Warehouse in Microsoft Fabric

The queryinsights.sql_pool_insights in Microsoft Fabric Data Warehouse monitors resource allocation, tracks configuration changes, and identify periods when pools are under pressure.

Column name Data type Description
sql_pool_name nvarchar(128) Name of the SQL pool.
timestamp datetime2 Timestamp when the health check or capacity change took place.
max_resource_percentage int Maximum resource percentage allocated to the pool.
is_optimized_for_reads bit Indicates if the pool is configured for read-optimized workloads.
current_workspace_capacity nvarchar(16) Capacity currently used by the workspace.
is_pool_under_pressure bit Indicates if the pool is under pressure.

Remarks

In Fabric Data Warehouse, resource isolation is enforced between SELECT and NON SELECT pools, preventing contention. Two pools are present by default:

  • SELECT: Handles read (SELECT) queries, optimized for analytics/reporting.
  • NON SELECT Handles data modification (INSERT, UPDATE, DELETE), optimized for ETL/ingestion.

Event-based reporting

  • New records are logged when pool configuration, workspace capacity, or pressure state changes.
  • Pressure state changes are logged if the pressure is sustained for 1 minute or longer.
  • 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.

Permissions

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.

Examples

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:

A. Periods of pressure in the last 24 hours

Show periods when the SELECT pool was under pressure in the last 24 hours:

-- Show periods when the SELECT pool was under pressure in the last 24 hours
SELECT sql_pool_name, timestamp, is_pool_under_pressure
FROM queryinsights.sql_pool_insights
WHERE sql_pool_name = 'SELECT'
  AND timestamp >= DATEADD(hour, -24, GETDATE())
  AND is_pool_under_pressure = 1
ORDER BY timestamp DESC;

Calculate consecutive pressure periods and gaps using window functions:

-- Calculate consecutive pressure periods and gaps using window functions
SELECT sql_pool_name,
       timestamp,
       is_pool_under_pressure,
       LAG(timestamp) OVER (PARTITION BY sql_pool_name ORDER BY timestamp) AS previous_event,
       DATEDIFF(minute, LAG(timestamp) OVER (PARTITION BY sql_pool_name ORDER BY timestamp), timestamp) AS minutes_since_last_event
FROM queryinsights.sql_pool_insights
WHERE sql_pool_name = 'SELECT'
ORDER BY timestamp;

Next step