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 |
How to get the definition of a trigger back?
can you any body tell me the difference between candidate key and primary key
if 3 duplicate records in table,i want to delete 2 alternating duplicate records by keeping 1 duplicate and 1 original as it is,how?
Explain the steps to use transact-sql cursor?
What is difference between join and natural join?
What are functions in the sql server?
How to add a new dsn with the odbc driver for sql server?
What is an expensive query?
How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?
What are Sql Reporting Services and analysis services? Can u Explain
What are “lock” hints?
What is the difference between osql and query analyzer?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)