[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News SQL Server 2016: Clustered Columnstore Index Enhancements

SQL Server 2016: Clustered Columnstore Index Enhancements

Jun 04, 2015 1 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

Clustered Columnstore Indexes (CS Index) were one of the two headline features for SQL Server 2014. Designed for tables with over 10 million rows, they allow for good performance on analytical queries without the need to explicitly specify indexes.

A downside of the 2014 version is that you can’t specify indexes. While a CC Index is much faster than a table scan on a traditional table, it isn’t anywhere near as fast as a hand-tuned covering index. So in order to support both modes, developers have been creating two tables: a normal table with B-Tree indexes and a Clustered Columnstore Index. Keeping them synchronized is of course a challenge.

In SQL Server 2016, this is no longer a problem. Level 130 Clustered Columnstore Indexes can have secondary, B-Tree style indexes just like a traditional table. These indexes support any number of columns and may be filtered.

Another issue with Clustered Columnstore Indexes is the lack of primary and foreign key support. Since the database couldn’t enforce referential integrity on a CC Index, it is up to the middle tier developer to ensure no data corruption occurred. With the ability to apply B-Tree indexes on CC Indexes, you can create “primary keys and foreign keys by using a btree index to enforce these constraints”.

Warning: “MERGE is disabled when a btree index is defined on a clustered columnstore index.”

Isolation Levels

Starting with 2016, CC Indexes support the snapshot and read-committed snapshot isolation levels. This removes the need for a reader-writer lock, which in turn allows for better performance in tables that are being actively written to.

Index Defragmentation

CC Indexes in SQL Server 2014 were designed primarily for append-only style workloads. While you can modify or delete records, this causes fragmentation that could only be resolved by rebuilding the entire CC Index. In 2016, you can reorganize the index to reduce fragmentation. Index reorganization is always an online operation, meaning that it doesn’t hold long-term locks that would prevent querying the table.

Batch Mode Enhancements

Because it uses the same storage engine, CC Indexes get the same batch mode enhancements as Non-clustered Columnstore Indexes.

Rate this Article

Adoption
Style

This content is in the SQL Server topic

Related Topics:

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /