Bak2Basics: Know thy indexes
Posted by: Sahil Malik - blah.winsmarts.com,
on 26 May 2006 |
View original | Bookmarked: 0 time(s)
p{color:black;}Okay so heres another bak2basics kinda post Know thy indexes. (If u got more stuff to add, please do :-))
What are indexes? Well indexes are exactly what youd think they are like at the back of a book? They are a logical arrangement of your data, so you can find the data easily. So SQL Server has two kinds of indexes, Clustered and Non-Clustered. 1. Both clustered and non-clustered indexes are implemented using a variant of B-Tree, but a clustered index reorganizes the data pages of the indexed table, whereas a non-clustered index is created in seperate data pages.2. Clustered indexes are usually to support primary keys and should be used to index only narrow columns thus making them a bad candidate for GUIDs. Thus, if you...