This metric calculates the number of SQL compilations per second, including statement-level re-compilations.
This metric uses the counter SQL Compilations/sec
from the SQL Server SQL Statistics
counter object. On SQL Server 2000 instances, this counter is available through sysperfinfo
. On SQL Server 2005 or later instances, this counter is available through sys.dm_os_performance_counters
.
A high number of compilations (greater than 100 per second) can indicate a high server workload or that there is more recompilation overhead than necessary. Too many compilations can impact a server's performance.