FIX: UPDATE STATISTICS performs incorrect sampling and processing for a table with columnstore index in SQL Server

Applies to: SQL Server 2012 EnterpriseSQL Server 2012 DeveloperSQL Server 2012 Standard More

Symptoms


Assume that you create a columnstore index on a table that has a clustered index and has no non-clustered index in Microsoft SQL Server 2012 or SQL Server 2014. When you run UPDATE STATISTICS on the clustered index, incorrect sample percent is applied, and the histogram steps do not represent the correct data distribution. You can view the result by running the following command after you update the statistics:
DBCC SHOW_STATISTICS ( table_or_indexed_view_name , target ) WITH STAT_HEADER
In this situation, the statistical updating might take a longer time, and the incorrect histogram steps can cause sub-optimal query execution plans.

Note This issue also occurs in SQL Server 2012 Cumulative Update 8 (CU8) or the later versions.

Resolution


The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 4 for SQL Server 2014

Cumulative Update 2 for SQL Server 2012 SP2

Workaround


To work around this issue, add a non-clustered index on the table.

Status


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