| Author |
Topic |
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2007-01-08 : 05:23:55
|
| can anybody tell me in which situation we have to use index and please show some examples how to use |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-08 : 05:44:50
|
| Read about Indexes in Books Online. It is too comprehensive topic to discuss here. But the gist is create indexes on the columns which you frequently use in your WHERE clause.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2007-01-08 : 05:58:06
|
| hi harsh_athalye i searched in google i couldn't find good link ,can u please show some links to study about indexes please |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-08 : 06:23:13
|
| Books Online is an SQL Server help facility that gets installed with the SQL Server. You need to look there on details of using Indexes.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhuotp
Yak Posting Veteran
78 Posts |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-01-08 : 23:07:14
|
http://www.sql-server-performance.com/mr_indexing.asp www.elsasoft.org |
 |
|
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2007-01-08 : 23:19:09
|
| hi,jezemine,madhuotp thanks a lot for your kind reply |
 |
|
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2007-01-08 : 23:44:18
|
| hi jezemine, i have created index on my dat column which consists of 100 records, i want to check the execution time of this.is it possible to see the execution time or speed?if means please tell me how to see |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-01-09 : 12:09:14
|
execution time it not what's important. with only 100 records the query will come back instantly even with no indexes.what's important is to look at the query plan and see that there are index seeks, and no table/index scans. To look at the plan, you have to execute your query in QA or SSMS with showplan on.On the other hand, sometimes when there are indexes you still get a table scan if the optimizer thinks doing the bookmark lookups would take more reads than just scanning the entire table. that happens if your query is returning a large fraction of the rows in your tables. in any case, the subject of proper indexing is too big to discuss here. I suggest you read more of BOL and the articles on http://www.sql-server-performance.com about indexing. www.elsasoft.org |
 |
|
|
|