Applies ToSQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Standard SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use)

Symptoms

Assume that you try to insert values into the leading index column in Microsoft SQL Server 2012 or SQL Server 2014. When fewer than 90 percent of the inserted rows have values that are beyond the highest RANGE_HI_KEY value in the histogram, the column is considered stationary instead of ascending. Therefore, the ascending key is not detected, and trace flags 2389 and 2390 that are usually used to fix the ascending keys problem do not work. This causes poor cardinality estimation when you use predicates that are beyond the RANGE_HI_KEY value of the existing statistics.Note When you apply this cumulative update, you should enable trace flag 4139. This causes SQL Server to always amend the histogram in the described scenario regardless of the leading column status (ascending, descending, or stationary).

Resolution

This issue was first fixed in the following cumulative updates for SQL Server:

Cumulative Update 1 for SQL Server 2012 SP2 Cumulative Update 2 for SQL Server 2014 Cumulative Update 10 for SQL Server 2012 SP1

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:

Status

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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.