Listing 2: Gathering Query Performance Statistics SET STATISTICS PROFILE ON; SET STATISTICS IO ON; SET STATISTICS TIME ON; GO SELECT SalesOrderID, OrderDate, Status, h.CustomerID, c.AccountNumber, Name as Territory, CountryRegionCode as CountryRegion FROM OrderHeader h JOIN Customers c ON h.CustomerID = c.CustomerID JOIN Territory t ON c.TerritoryID = t.TerritoryID WHERE c.TerritoryID = 2; SET STATISTICS PROFILE OFF; SET STATISTICS IO OFF; SET STATISTICS TIME OFF;