SET STATISTICS profile on: Displays the time, in milliseconds, that is required to parse, compile, and execute the query.
SET STATISTICS IO on: Reports information about the number of scans per table referenced in the statement, the number of logical reads (pages accessed in the cache), and the number of physical reads (the number of times the disk was accessed).
Set STATISTICS time on: Displays the result set after each query execution, representing the configuration file that the query executes.
How to use: Open SQL SERVER Query Analyzer and enter the following statement:
Set STATISTICS PROFILE on
SET STATISTICS IO on
Set STATISTICS TIME on
Go
/*--your SQL script starts */
SELECT * from T_name
/*--your SQL script to the end */
Go
Set STATISTICS profile off
SET STATISTICS IO off
Set STATISTICS time off
SQL: View statement execution time--test SQL statement performance