Home > Ask the SQL Server Experts > Questions & Answers > Difference between clustered and non-clustered indexes
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Difference between clustered and non-clustered indexes

Rudy Limeback EXPERT RESPONSE FROM: Rudy Limeback

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 16 May 2001

What's the difference between clustered and non-clustered indexes? When do you use them for assigning UNIQUE constraints?


>

Every index implicitly involves a logical sequence. This allows for searching. If the database engine is searching an index linearly, i.e. in logical sequence, it will know when to stop when it either finds the entry or notices that it has "gone past" the point in the sequence where the entry "belongs." (However, most database engines use more efficient index searches than linear.)

A clustered index is one in which the index entries are actually data records. So when the database searches for an entry, it will end up with the actual data a lot faster. This means that the index/data entries have to be physically stored on the disk in a manner that aids retrieval -- in most cases, this is in sequential order.

Contact the DBA for your installation to find out whether your database supports clustering indexes and whether he or she recommends them, and under what conditions.

Unique constraints should be declared separately from the indexes (it is only a coincidence that most database engines utilize an index in order to enforce a unique constraint). Again, consult your DBA about whether your particular database allows unique clustering indexes.

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SQL Server High Availability, Scalability and Reliability
Are data warehouses made for the cloud?
Top load balancing methods for SQL Server
Maintaining high availability of SQL Server virtual machines
Creating fault-tolerant SQL Server installations
Scaling up vs. scaling out with SQL Server 2008
How to configure storage in SQL Server database with more writes than reads
SQL Server database replication tutorial
Licensing a standby server for SQL Server replication
Get SQL Server log shipping functionality without Enterprise Edition
Monitor database mirroring and replication after a SQL Server upgrade
SQL Server High Availability, Scalability and Reliability Research

Microsoft SQL Server Installation
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Migrating down to Standard Edition
What's new for installation with SQL Server 2008?
Creating fault-tolerant SQL Server installations
SQL Server consolidation: Why it's an optimization technique
SSIS error message due to installation problem on SQL Server 2005
Get SQL Server log shipping functionality without Enterprise Edition
Tutorial: Migrating to SANs from local SQL Server disk storage
SQL Server tools don't appear in menu after SQL Server 2005 install
Troubleshoot SQL Server 2005 SP2 installation error
Microsoft SQL Server Installation Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts