KB3198775 - FIX: Inefficient query plan is used for a query requiring order by partitioning column of a table with single partition

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:

Latest cumulative update for SQL Server 2016

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.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×