Improved SQL Server stability and concurrent query execution for some columnstore queries in SQL Server 2014 and 2016

Symptoms
Consider the following scenario:
  • You have a table that has clustered columnstore indexes on it, and the table has lots of columns (in hundreds).
  • The data (data type) of these columns is highly compressible data such as varchar.
  • You run a SELECT statement against this table to select a large subset or all columns from this table.
  • Your select statement has a WHERE clause that limits the output of it to a very few rows (the query is highly selective).
In this scenario, you may encounter any of or all following symptoms:
  • The concurrent workload, (other queries that are executed at the same time on the server as this query), may encounter decrease in performance and loss of throughput.
  • You may see intermittent high CPU usage.
  • If you query sys.dm_os_ring_buffers and view SchedulerMonitor type entries, you find intermittent "non-yielding scheduler" messages logged during the time of execution of this query.
  • You may receive a non-yielding scheduler error in error log and a symptom memory dump file may be generated.


Resolution
The issue was first fixed 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:
More information

Fix details

The workers that process the column segments (uncompressing them and scanning them for qualifying rows) used to "yield" CPU usage to other workers/concurrent query executions when a certain threshold number of rows was output. When the WHERE clause was highly selective to produce few rows, the workers that process this query processed uncompressed and large number of segments (because very few rows qualify) before they gave up the CPU in cooperative manner for other workers to process their workload. This led to irregular CPU usage and throughput degradation for concurrent workload. The fix optimizes and improves CPU sharing algorithm for such columnstore queries.
References
Learn about the terminology that Microsoft uses to describe software updates.
Properties

Article ID: 3191487 - Last Review: 10/18/2016 05:55:00 - Revision: 2.0

Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Enterprise Core, Microsoft SQL Server 2014 Standard

  • kbqfe kbfix kbsurveynew kbexpertiseadvanced KB3191487
Feedback