Databases Reference
In-Depth Information
--index defined on ProductId column
ALTER INDEX IX_SalesOrderDetail_ProductID
ON Sales.SalesOrderDetail REBUILD
--Again execute Stored Procedure by passing it
--764 as the value of ProductID
EXECUTE usp_GetSalesOrderDetail_ProductID 764
GO
12. Now, switch to Reliability and Performance Monitor and note the statistics for
compilations/recompilations. Also, note the spikes in the graph for compilations
and recompilations:
How it works...
In this recipe, we started by opening the Reliability and Performance Monitor tool. First,
we deleted existing performance counters and added the following ones:
F SQL Server:SQL Statistics:SQL Compilations/sec
F SQL Server:SQL Statistics:SQL Re-Compilations/sec
 
Search WWH ::




Custom Search