Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add more than 16 columns to clustered index

Tags:

sql-server

Is there any way by which i can add more than 16 columns in clustered index.


2 Answers

As of SQLserver 2008 , no. However , I suspect the bottleneck is somewhere else if you require a clustered index on more than 16 columns.

like image 113
Learning Avatar answered Jan 29 '26 13:01

Learning


No. further, you are limited to a total of 900 bytes of data for the combined key size.

Quoting from the Create Index reference page.

Up to 16 columns can be combined into a single composite index key. All the columns in a composite index key must be in the same table or view. The maximum allowable size of the combined index values is 900 bytes. For more information about variable type columns in composite indexes, see the Remarks section.

like image 21
tvanfosson Avatar answered Jan 29 '26 13:01

tvanfosson