STATISTICS IO: Example 1
Your sales company has just taken on a new regional manager for Western Europe. He has asked you to provide him daily updates on orders shipped to some key Western Europe capital cities. As this data is time sensitive, you want a robust query that is tuned to return the results as quickly as possible.
You initially decide on a query that uses two sub-queries: one in the SELECT
statement to get the count of orders and one using a filter condition with an IN
operator.
You will turn on the STATISTICS IO
command to review the page read statistics.
This exercise is part of the course
Improving Query Performance in SQL Server
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
___ ___ ___ ___ -- Turn the IO command on