2026-12-02

Hidden query efficiency concern - WAIT_ON_SYNC_STATISTICS_REFRESH

WAIT_ON_SYNC_STATISTICS_REFRESH is a SQL Server wait type that occurs when a query is waiting for synchronous statistics updates to complete before it can continue execution. When SQL Server determines that table or index statistics are out of date, it automatically update them. If the database option AUTO_UPDATE_STATISTICS is enabled (default), the query that triggered the update must wait until the statistics refresh finishes.

By the way, Query Store does not include WAIT_ON_SYNC_STATISTICS_REFRESH in the query’s duration, even though users experience the delay. The reason is that WAIT_ON_SYNC_STATISTICS_REFRESH occurs in the compilation phase, before the query begins running.

For instance, the query below uses the AggregationResults table. Query Store reports that it completed in less than 5 seconds, but some executions failed, shown by the small triangles.

However, the monitoring tools showed the query waiting for WAIT_ON_SYNC_STATISTICS_REFRESH for roughly five minutes.

We can find the statistics update history in the Query Store DMVs. As shown below, the StatMan commands for the tables took 300 seconds and caused the application to time out.

A solution is to enable AUTO_UPDATE_STATISTICS_ASYNC for the database.