what is index seek and index scan?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can select statements be used on views in ms sql server?

669


How do I setup a local sql server database?

620


What is difference in performance between insert top (n) into table and using top with insert?

628


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

1382


What is table valued function and scalar valued functions?

576






Can we update data in a view?

699


What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio

688


Explain few examples of RDBMS?

685


What have included columns when we talk about sql server indexing?

667


What is meant by referential integrity?

676


What are the advantages of using cte?

638


How do I view a stored procedure in sql server query?

608


What are different types of collation sensitivity?

622


What is clr ddl trigger?

635


Explain security with sql azure?

165