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.
Author |
Topic |
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-10 : 05:45:35
|
GurusPlease advice me that how should i decide whether to put cluster index or non cluster index.Please helpRegardsNitin |
|
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" |
 |
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
|
|
|
|