July 5, 2011 at 10:57 am
Just curious, can you have a clustered index and non clustered index on the same table? :hehe:
July 5, 2011 at 10:59 am
yes
http://msdn.microsoft.com/en-us/library/ms177484.aspx
A clustered index changes the structure of the table and how it is stored, which is why only one can exist on a table. A nonclustered index has the same structure as a clustered index, but does not change the table structure itself.
Someone else can probably give you a more specific answer than that but that is the way I understand it.
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
July 5, 2011 at 11:09 am
You can have a clustered index and up to 999 nonclustered indexes on a table.
For a well-performing system you will likely need a few nonclustered indexes on each table (generalisation), plus a carefully chosen clustered index.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 5, 2011 at 11:09 am
Excellent series here :
July 5, 2011 at 11:46 am
Thank you everybody. 😀
July 5, 2011 at 1:54 pm
A table can have 1 clusted index and 999 non clustered index and the number of key column is limited to 16
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply