May 3, 2009 at 12:30 pm
I'm digging into Clustered Indexes versus Non-Clustered, and from what I'm understanding Clustered are the way to go (if you have the overhead etc. for them in your database). Sooooo my question is - how do I find out if my database has indexes and what kind they are? Looking at SysIndexes, I can't see anything indicating Clustered/NonClustered, and all the reading I've done says to use them but doesn't say how to find them 🙁
Any ideas?
Appreciate your time
Chris
May 3, 2009 at 12:43 pm
Hopefully you also noticed in your reading that a table may only have 1 clustered index. You can learn more about the indexes by using the INDEXPROPERTY. You can learn more about this in Books On-Line (BOL).
May 3, 2009 at 1:04 pm
Awesome - thanks a lot Lynn, that's perfect!
Have a great day and may the Force be with you 😀
Chris
May 3, 2009 at 4:13 pm
If you look in sysindexes, the clustered index is the one that has an indid of 1. Nonclustered indexes have indids between 2 and 249.
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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply