[フレーム]
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: In-Memory Columnstore Indexes

SQL Server 2016: In-Memory Columnstore Indexes

Jun 02, 2015 1 min read

Write for InfoQ

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

New for SQL Server 2016 is the ability to place a Columnstore Index on a Memory Optimized Table. To understand what that means, we should first define the terms Columnstore Index and Memory Optimized Table.

A Columnstore Index is an index that organizes its data in terms of columns instead of rows. Each block of data represents one column with up to one million rows. So if you had five columns and ten million rows, you would have 50 blocks of data. This organizational strategy is particularly effective when you only want a subset of the columns, as the columns you don’t care about aren’t read from disk.

Columnstore indexes are significantly faster than table scans, but not quite as fast as traditional B-Tree style indexes. This makes especially suited for ad hoc reports where you can’t predict which indexes will be needed.

A Memory Optimized Table is just what it sounds like, a table that is optimized to be held in memory at all times. This allows for numerous benefits such as lock-free writes, but it comes with significant limitations. For example, you are only allowed eight indexes, which can be quite limiting for a table being used for ad hoc queries.

SQL Server 2016 partially compensates for this limitation by allowing one of those eight indexes to be a Columnstore Index. But there are rules that you need to follow:

  • Like other indexes on a Memory Optimized Table, the Columnstore Index must be defined when the table is created.
  • The Columnstore Index must include all columns in the base table. (This limitation doesn’t exist for Columnstore Indexes on normal tables.)
  • The Columnstore Index must include all rows in the base table. Or in other words, it can’t be a filtered index.

A related feature for Memory Optimized Tables is the ability to create natively compiled queries. These are queries that, instead of using the SQL Server interpreter, are compiled to machine code using the C compiler. Queries that use the Columnstore Index can’t use this option, and instead always run through the interpreter.

Rate this Article

Adoption
Style

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 によって変換されたページ (->オリジナル) /