what is index seek and index scan?
Answers were Sorted based on User's Feedback
Answer / sumit
Index Scan is nothing but scanning on the data pages from
the first page to the last page. If there is an index on a
table, and if the query is touching a larger amount of
data, which means the query is retrieving more than 50
percent or 90 percent of the data, and then optimizer would
just scan all the data pages to retrieve the data rows. If
there is no index, then you might see a Table Scan (Index
Scan) in the execution plan.
Index seeks are generally preferred for the highly
selective queries. What that means is that the query is
just requesting a fewer number of rows or just retrieving
the other 10 (some documents says 15 percent) of the rows
of the table.
In Index Scan the cost is proportional to the total number
of rows in the table. Thus, a scan is an efficient strategy
if the table is small or if most of the rows qualify for
the predicate.
In Index Seek the cost is proportional to the number of
qualifying rows and pages rather than to the total number
of rows in the table.
Is This Answer Correct ? | 11 Yes | 2 No |
What is the difference between char and varchar2 datatype in sql?
Define primary key?
How many types of indexes are there in SQL Server?
6 Answers CarrizalSoft Technologies, United Healthcare,
Why would you use sql agent?
What protocol does sql server use?
What is sql server profiler trace data file?
Explain basic SQL queries with SELECT from where Order By, Group By-Having?
How do I create a partition table in sql server?
how can we use a composite key for two tables and how can we represent it
Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
How can we call UDF(User Define Function) using C# code in ASP.net ?
How do I find the port number for sql server?