Link to home
Start Free TrialLog in
Avatar of dshi15
dshi15Flag for United States of America

asked on

sql server check index scan operation

Hi Expert,

I prepare 433 Sql server Exam,

How I can find index scan operation in this query? This from 433 self-paced trainning book.

USE AdventureWorks;

CREATE NONCLUSTERED INDEX OrderDateIndex
    ON Sales.SalesOrderHeader (OrderDate);

SELECT COUNT(*) FROM Sales.SalesOrderHeader
    WHERE YEAR(OrderDate) = 2004;


Thanks in advance.

Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Howdy. Since you are trying to learn, I will give you some hints and through some back and forth, hopefully you will learn the concepts better. Is there any think that will show you how the query you have will be executed? Additionally, does the YEAR() function affect anything in your query?
Avatar of dshi15

ASKER

thanks, I don't you explain anything yet, I want see the Figure, in the book, it said pressing Ctrl+M you can view execution plan for the query, and there is a figure on the book, how I can see it, after I run the query I can not see anything except query result by pressing Ctrl+M.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dshi15

ASKER

Thank you very much, got it, if I have further question, I will open new question.
You are most welcome. The issue is usually discussed under search argument able topic. See SQL Server MVP Rob Farley's explanation here on EE: https://www.experts-exchange.com/A_2531.html

Best regards and happy coding,

Kevin