The Columnstore Indexes & Batch Mode Processing (R)Evolution in SQL Server 2014
aka “Apollo has landed”
(Apollo was the Codename for the Columnstore Index project before SQL Server 2012)
Whereas In-Memory Transactional Processing with XTP builds the foundation for the shift in processing OLTP in SQL Server 2014, for OLAP/datawarehouse-systems Columnstore Indexes have been improved fundamentally. In fact the improvements are so huge, that it can be foreseen that Columnstore will become the standard type of storage for DataWarehouses starting in SQL Server 2014 (at least for systems running Enterprise Edition).
Let’s start with what we had and missed at the same time so far, in SQL Server 2012 when Columnstore Indexes were introduced:
- One Non-clustered columnstore index (I’ll refer to that as NCCI from now on) per table – the clustered was still row-based
- No DML support: no updates (data refresh) – biggest bummer for close to real-time DataWarehouses and continuous updating
- Mediocre memory management – i.e. Resource Governor not honored
- No batch hash join spilling
- Limited data types support – ok, I personally have little problems with that as it forced developers to wisely chose column-types and table design (remember, that columnstore indexes were mainly meant for FactTables in DataWarehouses), but that’s just my personal opinion on that 🙂
- Limited batch operations supported – one unsupported plan operator led to row-mode processing of the whole query
Out of that list, probably the biggest issues in SQL Server 2012 are, that updates to columnstore indexed tables are only possible by drop NCCI/load data/create NCCI or partition switching and secondly: many queries actually do not get even get all of the possible performance gain from the NCCI because of an unsupported operation inside the query (plan).
At the TechEd Europe 2013 in Madrid CTP1 of SQL Server 2014 was announced publically available (andreas-wolter.com/ctp1-sql-server-2014-release-techedeurope/ ) and as detailed information on the big improvements are finally official, I can share the good news with my readers (Big Thanks to Igor Stanko from the Parallel Datawarehouse-Team at Microsoft who answered all questions in detail, while “bound” with me and other MCMs and MVPs at the Microsoft booth 😉 )
To the facts:
In SQL Server 2014,
- We can create a Clustered Columnstore Index (CCI)
- Clustered Columnstore Indexes will be Updatable with standard DML-Operations! – this works via a delta store and a tuple mover, that converts a once full segment into column store
- Memory management is dynamic and honors resource governor settings
- (Hash Join) Spilling now supports Batch Mode
- Mixed row and batch mode inside query execution now works
- We have more supported operators in batch mode (Outer Join, partial Aggregates, Union All)
- The new compression type: “COLUMNSTORE_ARCHIVE” adds another 30% compression for chosen table/partition
- More data types are supported (high precision decimal, (var)binary, uniqueidentifier)
Clustered ColumnStore Index Insert:
– Those improvement combined can hardly be overestimated as they ultimately lead to one conclusion:
“Columnstore (and clustered columnstore index) will be PREFERRED storage engine for DW scenarios”
(this is an official quote from Microsoft – and I see no need to say it any differently)
Note: The Clustered Columnstore Index feature is was actually developed by the Parallel Data Warehouse (PDW)-Team for the PDW Version 2012 which was released in the beginning of 2013. (Thanks, Henk van der Valk for reminding me of that not so insignificant fact.)
And here is a comparison of the possible space savings when using CCI over any other indexing methods so far (released at TechEd 2013 – I’ll let the graph speak for itself):

After all the good news: Is there anything that we might still miss when using ColumnStore? I do not want to forget to mention the few things that might still hurt:
- No constraints using index are supported, not even Foreign Keys without index. So if such is needed, one has to revert to using a hybrid approach with NCCIs and using partition switching or any other of the methods as before.
- Also DML-Triggers are not possible with CCIs.
- Just for completeness: no other indexes are possible when a CCI is present on a table. But there is no use for it anyways, as the attentive reader might have noticed by now 🙂
So, as a datawarehouse-architect I am really excited and looking forward to the first implementations of Datawarehouses under SQL Server 2014. The index-design will become much easier, in fact in many environments even trivial. – Note, that I am not using the word “database-design” itself: A proper database-design (hint: “star-schema”) is still necessary to get the maximum performance gain possible – don’t forget that batch mode processing and segment elimination are the keys to the max.
happy indexing
Andreas
