Design an indexing solution

A good understanding of the data warehouse workload, its structure, and index types are all very important for designing a proper indexing solution.

The two main types of indexes that are part of almost every data warehouse index solution are rowstore and columnstore indexes. Rowstore indexes store table or view data horizontally based on rows of data. Columnstore indexes store table or view data vertically based on column values. Rowstore indexes are the traditional indexes that have been present since the early versions of SQL Server. Columnstore indexes are a newer type of in-memory index that provide increased performance benefits over traditional rowstore indexes in data warehousing workloads.

Rowstore indexes
Rowstore indexes can be defined as clustered or nonclustered row indexes. A clustered rowstore index sorts and stores table or view data in rows in the order of the clustered index key. The clustered index key is usually the table’s primary key, although you can also define a clustered index on tables with no primary key. A table with a clustered index is commonly known as a clustered table. A clustered table can have one and only one clustered index. 

Nonclustered rowstore indexes store the nonclustered index key values with a pointer, known as the row locator, to the data row in a heap table or to the clustered index key in a clustered table.







Columnstore index
A columnstore index is an in-memory technology that stores and manages data by using a column-based format. Columnstore indexes store data in rowgroups as opposed to rowstores. The rowgroups contain compressed column values, known as column segments. This columnar storage format greatly improves query performance because only the specific column segments for the query requested values need to be decompressed. 

The compression algorithm behind a columnstore index can greatly reduce the storage footprint when compared to a traditional rowstore index. A columnstore index is the recommended index for large data warehouse fact tables.


Comments

Popular Posts

Non-blocking, semi-blocking, and blocking transforms in SSIS

Implement additive, semi-additive, and non-additive measures

Design an appropriate storage solution, including hardware, disk, and file layout