Query plan generation improvement for some columnstore queries in SQL Server 2014 or 2016

When you run a query that has a table join for clustered columnstore tables, and the JOIN ON and the WHERE clauses refer to the same columns, SQL Server may not evaluate a hash join for the table join.
This issue occurs because the join keys are removed from the query tree during query normalization. By design, SQL Server doesn't generate a hash join plan for joins without join keys.

Cumulative Update information

This improvement was introduced in the following cumulative update of SQL Server. 
Recommendation: Install the latest cumulative update 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. We recommend that you download and install the latest cumulative updates for SQL Server:
To work around this issue, add the OPTION (HASH JOIN) hint to the query.
More information
This cumulative update introduces that SQL Server evaluate a HASH join plan when a table join is performed for columnstore tables. Queries that access columnstore tables may benefit by hash join because hash join can be performed in batch mode.

To enable the improvement, add trace flag 2441 to the startup parameters or add OPTION (QUERYTRACE, 2441) to the query.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 3146123 - Last Review: 07/26/2016 08:45:00 - Revision: 4.0

Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Enterprise Core, Microsoft SQL Server 2014 Standard, Microsoft SQL Server 2014 Business Intelligence, Microsoft SQL Server 2014 Web, Microsoft SQL Server 2016 Developer, Microsoft SQL Server 2016 Enterprise, Microsoft SQL Server 2016 Enterprise Core, Microsoft SQL Server 2016 Standard

  • kbqfe kbsurveynew kbfix kbexpertiseadvanced KB3146123