Wednesday, November 26, 2008

Index Seek Vs Index Scan

Index Seek Vs Index Scan
Many developers exactly knows the different between Index seek and Index scan. But few developers may be in the confusion to find the difference between Index Seek and Index scan.
  • When the table is created with the Index then the query will not do the table scan. It will go for Index scan or Index seek it depends.
  • For example, the table T1 have an index called Ix1. It is having more than 5 Cr of records.
  • When the developer fires an query with a where condition on the Index column. Then the Query will for Index seek or Index Scan.
  • Index Seek or Index Scan is purely depends on the density of the rows which the query returns.
  • If the query returns less rows eg., only 5 to 10 rows then Index Seek will happen
  • If the query return more than 10000 rows then Index Scan will happen

I hope you will get some idea about the difference between Index seek and Index Scan

1 comment:

Dineshrajan said...

I got ur point. But could u provide me further more points where index scan occurs other than more no of density rows.