You have set AUTO_UPDATE_STATISTICS and your query is being suspended whilst out of date stats are updated.
Having object statistics up to date is key to the wellbeing of your database. SQL Server can manage the update of these statistics. The possible downside here is that if SQL Server decides the statistics are out of date on a table, it will suspend your query, refresh the statistics and then carry on. This can cause issues on large objects where the refresh of stats can take a significant time.
How to reduce this wait
Consider using the
NO_WAIT option which will refresh the statistics asynchronously for your selected database.
SET AUTO_UPDATE_STATISTICS_ASYNC ON WITH NO_WAIT
If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.
- Google Search for sqlserver - WAIT_ON_SYNC_STATISTICS_REFRESH
- Ecosia Search for sqlserver - WAIT_ON_SYNC_STATISTICS_REFRESH
- Bing Search for sqlserver - WAIT_ON_SYNC_STATISTICS_REFRESH