April 11, 2012 at 11:22 am
Can anyone please describe the indexing ? How I understand it improve the performance or not ? Please give some examples (Before / After indexing)?
April 11, 2012 at 11:48 am
well entire books have been written on indexing and improving performance;
i think you'll need to read up via a google search first, and come back with specific questions.
Lowell
April 11, 2012 at 11:57 am
Well, index helps to read data faster. There are two types of indexes, Clustered and Non-Clustered Indexes.
Clustered Index - provide the actual data page at the leaf level of the B-Tree.
Non-Clustered Index - provide the pointers to the actual data page at the leaf level of the B-Tree.
This is my understanding.
Regards,
SQLisAwe5oMe.
April 11, 2012 at 12:05 pm
Indexing good.
Think of it like a book. If you know the term you are searching for, you turn to the index in the back of the book. The index shows the page where the term may be found. You turn to that page and get your information.
A table index works the same. Your query uses the (non clustered) index to look up the page of the term (column value) in your search. The query then goes to that page and pulls back the data.
If a book has no index, you must go through every page searching for your information. It's the same with a table without an index on your search column. Your query must scan all rows looking for your information until it finds matches. It's not too bad with small books (and small tables). But try doing that with a 20 volume encyclopedia (they don't publish those any more), or a table with tens of millions of rows.
April 11, 2012 at 12:23 pm
Is there any unique format for query using index?
April 11, 2012 at 12:25 pm
Nope. You write the query the same way.
Actually, your indexing will be dependent on how you query your data.
April 11, 2012 at 12:26 pm
Maybe start with these
http://www.sqlservercentral.com/articles/Indexing/68439/
http://www.sqlservercentral.com/articles/Indexing/68563/
http://www.sqlservercentral.com/articles/Indexing/68636/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 11, 2012 at 3:28 pm
Thank you all
Its really helpful.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply