SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server Index


SQL Server Index

Author
Message
sharma-691993
sharma-691993
SSC Veteran
SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)SSC Veteran (204 reputation)

Group: General Forum Members
Points: 204 Visits: 215
Hi.. I am new to Index in SQL Server. Pls provide some info about
When to use Clustered Index & Non-Clustered Index?
What are the advantages & dis advantages of Clustered Index?
What are the advantages & dis advantages of Non-Clustered Index?

Thanks
Jack Corbett
  Jack Corbett
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18862 Visits: 14900
Have you looked in Books On Line?

A few general rules of thumb (and remember in SQL Server everything comes with an "It depends" attached):

1. Every table should have a clustered index.
2. The clustered index should be on a monotonically increasing value because the index IS the leaf level of the data (the data is physically stored in this order).
3. The clustered index key should be narrow because the clustered index is included in the non-clustered indexes.
4. Clustered indexes tend to be better for range queries while non-clustered indexes tend to perform better for equality queries.

Here's a link to a list blog posts by Gail Shaw (gilamonster here on SSC) that provide good index information:

http://sqlinthewild.co.za/index.php/category/sql-server/indexes/



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
jk.returns
jk.returns
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 4
http://msdn.microsoft.com/en-us/library/aa174523(SQL.80).aspx

http://msdn.microsoft.com/en-us/library/aa933131(SQL.80).aspx



go through these..........Wink
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search