FIX: High CPU use when large index is used in a query on a memory-optimized table in SQL Server

Van toepassing: SQL Server 2016 Service Pack 1SQL Server 2016 DeveloperSQL Server 2016 Enterprise

Symptoms


Consider the following scenario:

  • You use in-memory Online Transaction Processing (OLTP) in Microsoft SQL Server 2017, 2016, and 2014.
  • You execute a query on a memory-optimized table that contains a large index.

In this scenario, if you use the large index during the query execution, the CPU use might sharply rise to 100 percent very quickly. If you have more than one logical processors, only one of the processor usage might rise to 100 percent quickly.

Cause


This problem occurs because the garbage collection in in-memory OLTP might take a long time to finish if a large index is used in a query execution. 

Resolution


This problem is fixed in the following cumulative updates for SQL Server:

       Cumulative Update 4 for SQL Server 2017

       Cumulative Update 7 for SQL Server 2016 SP1

       Cumulative Update 2 for SQL Server 2014 SP3

Note After you install this update, you must enable trace flag (TF) 9945 to fix this problem. To enable TF 9945, see the Trace Flags (Transact-SQL) topic on the Microsoft Developer Network (MSDN).

Status


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

References


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