Hi, experts from SQL Server Engine; please share with us a little of your insight ...
As I understand it, INCLUDE columns in a non-clustered index allow you to store additional fuzzy data with index pages.
I am well aware of the performance benefits of a clustered index on a non-clustered index simply because of the first step that the engine must perform in order to search in order to get data on disk.
However, since INCLUDE columns live in a non-clustered index, it can be expected that the next query will have the same performance in scenarios 1 and 2, since all columns can be retrieved from index pages in script 2, and not ever resort to table data pages ?
QUERY
SELECT A, B, C FROM TBL ORDER BY A
SCENARIO 1
CREATE CLUSTERED INDEX IX1 ON TBL (A, B, C);
SCENARIO 2
CREATED NONCLUSTERED INDEX IX1 ON TBL (A) INCLUDE (B, C);
optimization sql-server indexing query-optimization
Tahbaza
source share