Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many clustered indexes there can be in one table?

In SQL Server 2008, how many clustered indexes there can be in one table?

like image 830
tesmp Avatar asked Jan 06 '11 18:01

tesmp


People also ask

How many clustered indexes will you be able to create?

Clustered index structure overview SQL Server allows us to create only one Clustered index per each table, as the data can be sorted in the table using one order criteria. In the heap tables, the absence of the clustered index means that the data is not sorted in the underlying table.

How many clustered and non-clustered index can be applied to a table?

A table can have only one clustered index. A table can have multiple non-clustered index.

How many indexes are allowed in a table?

SQL Server allows us to create multiple Non-clustered indexes, up to 999 Non-clustered indexes, on each table, with index IDs values assigned to each index starting from 2 for each partition used by the index, as you can find in the sys. partitions table.

How many indexes can be created on a single table?

A table or view is allowed one clustered index at a time. A view with a unique clustered index is called an indexed view.


2 Answers

Only one; and 999 non-clustered indexes http://msdn.microsoft.com/en-us/library/ms143432.aspx

like image 165
Matthew Avatar answered Sep 25 '22 08:09

Matthew


One. As noted here:

"A clustered index determines the physical order of data in a table. A clustered index is analogous to a telephone directory, which arranges data by last name. Because the clustered index dictates the physical storage order of the data in the table, a table can contain only one clustered index."

like image 21
Joe Stefanelli Avatar answered Sep 26 '22 08:09

Joe Stefanelli