FIX: Query Store enabled database takes long time on startup after you apply cumulative update for a SQL Server version

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core


Assume that you use Always On Availability Groups feature in Microsoft SQL Server 2016 with a database that has Query Store feature (QDS) enabled. If you apply a cumulative update for a SQL version to one of the replica nodes, the database will take a long time to start up during failover.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 


This issue is fixed in the following cumulative update for SQL Server:

About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:


You can use one of following ways to work around this issue:

  • Disable Query store feature before applying the cumulative update and failover.
  • Enable Trace Flag (TF) 9109 to skip startup sweep.


Learn about the terminology that Microsoft uses to describe software updates.