Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-09-02 : 07:27:55
|
| Hi all,In a table when there is 5 records its showing Index scan in esti execution plan if it has more records its showing Index seek.1.Table has non clustered primary key on identity column.2.Exact NCI value is used in where clause3.table has only 3 columnsAny body explain. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-09-02 : 08:27:05
|
| What's your question exactly? Why is it doing a scan rather than a seek? 5 rows of data is easier to scan than to do lookups from a seek.There's a section in Books Online on Index Seeks/Scans/Table Scans that explains what each operation does and several reasons why the operator chooses one over the other. |
 |
|
|
eralper
Yak Posting Veteran
66 Posts |
Posted - 2009-09-02 : 18:45:11
|
| Assuming that the table has only a small number of records, this means the sql engine can read the data with one io read if they are in the same date page.So sql will not even need for an index. Neither index scan nor index seek. Reading from index will boost the db server performance in cases where database table has too many rows with different values for the indexed column.-------------Eralperhttp://www.kodyaz.com |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-09-03 : 01:00:19
|
| Thanks all,Iam not bother about Seek\scan for this table iam wondering how table behaves with small and large data.once again thanks |
 |
|
|
|
|
|