Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Clustered and non clustered indexes

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-10-10 : 05:45:35
Gurus
Please advice me that how should i decide whether to put cluster index or non cluster index.
Please help
Regards
Nitin

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-10-10 : 06:45:09
A table can only have one clustered index and many non-clustered indexes. A clustered index physically change the ordering of data in your table and is usually put on the most selective columns of your table (very common to put one on the primary key columns, this is also done automatically by default). If you have a "customers"-table with social security number as a column it would be natural to put a clustered index on this column since it's most likely unique for each record.

Indexes can be complex to understand...you should look up "indexes" in books online and have a look at this link for further info:
http://www.sql-server-performance.com/gv_index_data_structures.asp

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2006-10-10 : 10:49:13
Here is another helpful link http://www.sql-server-performance.com/clustered_indexes.asp


-ec
Go to Top of Page
   

- Advertisement -