CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Improving Query Performance in SQL Server

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

___ ___ ___ ___ -- Turn the IO command on
Modifier et exécuter le code