Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server Index Expand / Collapse
Author
Message
Posted Tuesday, March 10, 2009 5:49 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, March 12, 2009 5:33 AM
Points: 68, 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
Post #672308
Posted Tuesday, March 10, 2009 7:22 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 6:29 PM
Points: 10,260, Visits: 13,230
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

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
Post #672404
Posted Thursday, March 12, 2009 4:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, March 12, 2009 6:42 AM
Points: 28, 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..........;)
Post #674067
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse