Indexes

Applies to: yesSQL Server (all supported versions) YesAzure SQL Database

Available index types

The post-obit table lists the types of indexes available in SQL Server and provides links to additional data.

Index type Clarification Additional information
Hash With a hash index, data is accessed through an in-memory hash table. Hash indexes consume a fixed amount of memory, which is a office of the bucket count. Guidelines for Using Indexes on Memory-Optimized Tables

Hash Index Design Guidelines

memory-optimized Nonclustered For retentiveness-optimized nonclustered indexes, memory consumption is a function of the row count and the size of the index central columns Guidelines for Using Indexes on Retentiveness-Optimized Tables

Memory-Optimized Nonclustered Index Design Guidelines

Amassed A amassed index sorts and stores the information rows of the table or view in social club based on the amassed index key. The amassed alphabetize is implemented as a B-tree alphabetize structure that supports fast retrieval of the rows, based on their amassed index central values. Clustered and Nonclustered Indexes Described

Create Amassed Indexes

Clustered Index Design Guidelines

Nonclustered A nonclustered index can be defined on a table or view with a clustered index or on a heap. Each index row in the nonclustered index contains the nonclustered key value and a row locator. This locator points to the data row in the clustered index or heap having the fundamental value. The rows in the index are stored in the order of the alphabetize central values, but the data rows are non guaranteed to be in whatever particular order unless a amassed index is created on the table. Clustered and Nonclustered Indexes Described

Create Nonclustered Indexes

Nonclustered Index Design Guidelines

Unique A unique index ensures that the index cardinal contains no duplicate values and therefore every row in the table or view is in some style unique.

Uniqueness can be a belongings of both amassed and nonclustered indexes.

Create Unique Indexes

Unique Index Design Guidelines

Columnstore An in-retentivity columnstore index stores and manages data past using column-based data storage and cavalcade-based query processing.

Columnstore indexes piece of work well for information warehousing workloads that primarily perform bulk loads and read-simply queries. Use the columnstore index to achieve upwardly to 10x query performance gains over traditional row-oriented storage, and upwardly to 7x information compression over the uncompressed data size.

Columnstore Indexes Guide

Columnstore Index Design Guidelines

Index with included columns A nonclustered index that is extended to include nonkey columns in addition to the key columns. Create Indexes with Included Columns
Alphabetize on computed columns An index on a column that is derived from the value of i or more other columns, or certain deterministic inputs. Indexes on Computed Columns
Filtered An optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table. A well-designed filtered index tin improve query functioning, reduce alphabetize maintenance costs, and reduce alphabetize storage costs compared with full-table indexes. Create Filtered Indexes

Filtered Index Design Guidelines

Spatial A spatial index provides the ability to perform certain operations more efficiently on spatial objects (spatial information) in a column of the geometry information type. The spatial index reduces the number of objects on which relatively costly spatial operations need to be practical. Spatial Indexes Overview
XML A shredded, and persisted, representation of the XML binary large objects (BLOBs) in the xml data type column. XML Indexes (SQL Server)
Full-text A special type of token-based functional index that is built and maintained by the Microsoft Full-Text Engine for SQL Server. Information technology provides efficient back up for sophisticated word searches in character string data. Populate Full-Text Indexes

Annotation

SQL Server documentation uses the term B-tree mostly in reference to indexes. In rowstore indexes, SQL Server implements a B+ tree. This does not apply to columnstore indexes or in-memory data stores. Review SQL Server Index Architecture and Pattern Guide for details.

SQL Server Alphabetize Design Guide
SORT_IN_TEMPDB Option For Indexes
Disable Indexes and Constraints
Enable Indexes and Constraints
Rename Indexes
Fix Index Options
Disk Infinite Requirements for Index DDL Operations
Reorganize and Rebuild Indexes
Specify Fill Cistron for an Index
Pages and Extents Architecture Guide
Amassed and Nonclustered Indexes Described