Sometimes we often worry about the low execution efficiency of our SQL statements. After repeated optimization, it will not be improved.
Then you can use this statement to find out where your SQL is slow.
Example:
Set statistics Io on
Set statistics time on
Go
--- The SQL statement you want to test
Select Top 100 * From tbl_cot_recstaticlist
Go
Set statistics profile off
Set statistics Io off
Set statistics time off
Display Information:
SQL Server Analysis and Compilation Time:
CPU time = 0 ms, occupied time = 59 Ms.
(100 rows affected) Table 'tbl _ cot_recstaticlist '. 1 scan count, 14 logical reads, 2 Physical reads, 992 pre-reads, 0 lob logical reads, 0 lob physical reads, and 0 lob pre-reads.
SQL Server execution time: CPU time = 0 ms, occupied time = 306 Ms.
SQL Server Analysis and Compilation Time: CPU time = 0 ms, time occupied = 1 ms.
SQL Server execution time: CPU time = 0 ms, occupied time = 1 ms.
SQL Server execution time: CPU time = 0 ms, occupied time = 1 ms.