Symptoms
You execute a query on a partitioned table that contains only one partition in SQL Server 2016. If the query requests a sort operation on the key columns of an index, SQL Server query optimizer doesn't match the correct index. In this case, the query optimizer uses an inefficient query plan and adds a SORT operator.
Resolution
The fix for this issue is included in the following cumulative update for SQL Server:
Cumulative Update 3 for SQL Server 2016
Notes
-
This change will be enabled only if trace flag 4199 is enabled, if the database scope of database configuration QUERY_OPTIMIZER_HOTFIXES is set to ON, or if query hint ENABLE_QUERY_OPTIMIZER_HOTFIXES is used.
-
The ENABLE_QUERY_OPTIMIZER_HOTFIXES query hint is available starting in SQL Server 2016 SP1.
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:
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 Microsoft uses to describe software updates.