SET STATISTICS TIME : This set statement is used to get the total time required to parse, compile and execute a SQL statement. The time is represented as milliseconds.
We may not get an accurate result (process time) if we enabled the lightweight pooling option.
The cpu column in the sysprocesses table is only updated when a query executes with SET STATISTICS TIME ON.
Example
SET STATISTICS TIME ON
or
SET STATISTICS TIME OFF
Example
This set statement is another important statement in the SQL query performance tuning.