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

Applies To
SQL Server 2016 Service Pack 1 SQL Server 2016 Developer - duplicate (do not use) SQL Server 2016 Enterprise - duplicate (do not use) SQL Server 2016 Enterprise Core - duplicate (do not use) SQL Server 2016 Standard - duplicate (do not use) SQL Server 2017 Developer SQL Server 2017 Enterprise SQL Server 2017 Enterprise Core SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Enterprise Core - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use)

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 processors 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).

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:

Latest cumulative update for SQL Server 2017

Latest cumulative update for SQL Server 2016

Latest cumulative update for SQL Server 2014

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.