What is Index Scan ,Index Seek and Table Scan?||SQLSERVER #index #sqlserver

preview_player
Показать описание
An index scan or table scan is when SQL Server has to scan the data or index pages to find the appropriate records.

1.Index Seek
When your search criterion matches an index well enough that the index can navigate directly
to a particular point in your data,
that's called an index seek. It is the fastest way to retrieve data in a database.
The index seeks are also a great sign that your indexes are being properly used.

2. Index Scan
If your table has a clustered index and you are firing a query which needs
all or most of the rows
i.e. query without WHERE or HAVING clause,
then it uses an index scan. It works similar to the table scan,
during the query optimization process, the query optimizer takes a look at
the available index and chooses the best one, based on information provided in your joins and where clause, along with the statistical information database keeps.

3.Table Scan
A table scan is a pretty straightforward process.
When your query engine performs a table scan it starts
from the physical beginning of the table and goes through every row in the table.
If a row matches the criterion then it includes that into the result set.
Please watch full video for detail.

#interviewquestions #sqlserver #performanceimprovement #performance
Рекомендации по теме
Комментарии
Автор

Nice video.
If we use the index key value then it is index seek, correct ?

saikiranp.r
Автор

Nice explanation .your way of explanation is easy to understand.keep up the good work!

thevideoguru
Автор

what is Unorderd covering non clustered index scan is there video
available

janhavighodake
Автор

Excellent explanation by taking a simple example. Thank you very much.

Shonuyadav
Автор

What an explanations sir.. Thanks for make it simple. I realy like to subscribe

prashant.khodey
Автор

Nice video in a simplified manner Thanks Shri

aashishmangal