|
Home >> FAQs/Tutorials >> SQL Server FAQ
SQL Server FAQ - Difference Between Clustered and Non-Clustered Indexes
By: FYIcenter.com
(Continued from previous topic...)
What Is the Difference Between Clustered and Non-Clustered Indexes?
SQL Server 2005 supports two types of indexes: clustered index and non-clustered index.
Here are the main differences between them:
- One table can only have only one clustered index.
- One table can only have many non-clustered index.
- A clustered index requires no separate storage than the table storage. It forces the rows to be stored
sorted on the index key.
- A non-clustered index requires separate storage than the table storage to store the index information.
- A table with a clustered index is called clustered table. Its rows are stored in a B-Tree structure sorted.
- A table without any clustered indexes is called non-clustered table. Its rows are stored in heap structure unsorted.
- The default index created as part of the primary key column is a clustered index.
(Continued on next topic...)
- What Are Indexes?
- How To Create an Index on an Existing Table?
- How To View Existing Indexes on an Given Table using SP_HELP?
- How To View Existing Indexes on an Given Table using sys.indexes?
- How To Drop Existing Indexes?
- Is the PRIMARY KEY Column of a Table an Index?
- Does the UNIQUE Constraint Create an Index?
- What Is the Difference Between Clustered and Non-Clustered Indexes?
- How To Create a Clustered Index?
- How To Create an Index for Multiple Columns?
- How To Create a Large Table with Random Data for Index Testing?
- How To Measure Performance of INSERT Statements?
- Does Index Slows Down INSERT Statements?
- Does Index Speed Up SELECT Statements?
- What Happens If You Add a New Index to Large Table?
- What Is the Impact on Other User Sessions When Creating Indexes?
- What Is Index Fragmentation?
- What Causes Index Fragmentation?
- How To Defragment Table Indexes?
- How To Defragment Indexes with ALTER INDEX ... REORGANIZE?
- How To Rebuild Indexes with ALTER INDEX ... REBUILD?
- How To Rebuild All Indexes on a Single Table?
- How To Recreate an Existing Index?
|