Wednesday, 7 September 2011

Checking logical reads of TSQL statements

Use the following statistics statements to check the logical reads and other performance stats when running a SQL Statement.
set statistics io on
set statistics time on

SELECT * FROM MyTable
set statistics io off
set statistics time off

Another trick for comparing equivalent sql statements, is to run them both with the execution plan on, and then compare the relative cost to the batch in the resulting execution plans of each statement.

No comments:

Post a Comment

How to by pass the Jaguary X-Type enter security pin screen after changing battery

How to bypass security code on Jaguar X-Type touchscreen Satellite Navigational units. Just hold the skip track, AMEM and PTY buttons ...