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 2005 Forums
 Transact-SQL (2005)
 Diff between an Index Scan and index seek?

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-08-09 : 17:09:45
how can I tell if a query is using an index scan or index seek?
what's the difference between the two?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-09 : 17:28:39
Look at the execution plan.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-08-09 : 18:42:11
An index scan may not necessarily be any better than a table scan. As the name implies it is a "scan" through the entire index. Generally, a "seek" will take advantage of the structure and nature of an index and take a much more direct route to the desired row(s).

Be One with the Optimizer
TG
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-08-09 : 20:44:00
Clustered index scan is same as table scan, but non-clustered index scan is not always bad. Maybe better than index seek if the index is deep and need return many rows.
Go to Top of Page
   

- Advertisement -