SET STATISTICS TIME ON
Select * from TableName
-- Or Any Query
SET STATISTICS TIME OFF 

It Results:
===============
SQL Server parse and compile time:
CPU time = 31 ms, elapsed time = 141 ms.

SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.

(49 row(s) affected)
SQL Server Execution Times:
CPU time = 47 ms, elapsed time = 354 ms.

  • Maruf Ahmad

    Nice simple code.