Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Clustered Index

Author  Topic 

mapidea
Posting Yak Master

124 Posts

Posted - 2009-02-02 : 10:27:24
I have few basic questions

Can we create clustered index on three or more columns?

Is there a limitation on the size of columns chossen for forming clustered index?

heavymind
Posting Yak Master

115 Posts

Posted - 2009-02-02 : 10:42:21
from msdn
quote:

2The maximum number of bytes in any index key cannot exceed 900 in SQL Server. You can define a key using variable-length columns whose maximum sizes add up to more than 900, provided no row is ever inserted with more than 900 bytes of data in those columns. In SQL Server, you can include nonkey columns in a nonclustered index to avoid the maximum index key size of 900 bytes.

so if your three columns are less than 900 bytes total - sure you can.

Thanks, Vadym
MCITP DBA 2005/2008
Chief DBA at http://www.db-staff.com
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-02 : 10:46:12
You need this actually:

http://msdn.microsoft.com/en-us/library/ms178085.aspx
Go to Top of Page

mapidea
Posting Yak Master

124 Posts

Posted - 2009-02-02 : 11:19:09
Thanks.
Go to Top of Page
   

- Advertisement -