August 5, 2008 at 12:51 pm
Hai,
this is anitha,any difference between indexscan and tablescan.
which cases it will be useful for us?
August 6, 2008 at 3:12 pm
Scanning clustered index on the table consumes the same resources as performing full scan.
However if index is nonclustered, scanning it will read all the index pages, but these are different to table data pages.
Refer to 'SQL Server Optimization' article (http://msdn.microsoft.com/en-us/library/aa964133.aspx ) for more info on indexes, table scans etc.
August 7, 2008 at 11:29 am
thank you max
August 7, 2008 at 3:42 pm
Generally, an index scan is faster, because it only contains columns which are indexed (unless it's a clustered index).
Keep in mind that a table scan is not always bad. Especially if it's a small table, the optimizer will prefer a tablescan depending on your where clause.
Wilfred
The best things in life are the simple things
August 8, 2008 at 1:01 am
In SQL Server 2005 nonclustered index can contain 'included' columns which are not part of index key, but are added to the leaf level. Index scan would also read these 'included' columns.
Article from MSDN: Index with Included Columns (http://msdn.microsoft.com/en-us/library/ms190806.aspx)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply