|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, June 06, 2013 4:06 PM
Points: 1,219,
Visits: 13,509
|
|
Comments posted to this topic are about the item Nonclustered Indexes
rfr.ferrari DBA - SQL Server 2008 MCITP | MCTS
remember is live or suffer twice!
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:53 AM
Points: 1,551,
Visits: 359
|
|
Is the same number (16) applicable for a clustered index in SQL Server 2008 ?
Checked the link, could not find if the above number is different in case of clustered index. Please comment. thanks
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:15 AM
Points: 1,479,
Visits: 1,943
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
ziangij (12/6/2010)
Is the same number (16) applicable for a clustered index in SQL Server 2008 ? Checked the link, could not find if the above number is different in case of clustered index. Please comment. thanks  Yes it is. If you check "CREATE INDEX (Transact-SQL)" in BOL, it mentions that: " 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."
Thanks
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
Straight forward question. Thanks
Thanks
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:15 AM
Points: 1,479,
Visits: 1,943
|
|
Hardy21 (12/7/2010)
ziangij (12/6/2010)
Is the same number (16) applicable for a clustered index in SQL Server 2008 ? Checked the link, could not find if the above number is different in case of clustered index. Please comment. thanks  Yes it is. If you check "CREATE INDEX (Transact-SQL)" in BOL, it mentions that: " 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."
Not entierly accurate. The clustered index have an exception to the 16 columns limit. It can be 15 in some cases. From the link in my previous post "Clustered index is limited to 15 columns if the table also contains a primary XML index or any spatial indexes."
/T
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410,
Visits: 6,495
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:56 AM
Points: 1,270,
Visits: 4,303
|
|
| Why does the question specify SQL 2008 when the limit for this, AFAIK, was the same in earlier versions? Thought it might be a tricksy question about filtered indexes till I saw the answers!
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, June 03, 2013 9:46 AM
Points: 1,164,
Visits: 2,603
|
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, June 14, 2013 7:30 AM
Points: 449,
Visits: 1,777
|
|
Slightly misleading wording. It should read "how many columns can be used in a nonclustered index key". The important part is to make clear that you are talking about the key columns of the index. Using the word "included" can be misinterpreted, especially since SQL 2005 where that is a keyword in indexing.
Regards,
WilliamD
|
|
|
|