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

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

Android mediaserver process killing battery life

If this happens to you, then do the following Force stop on Settings, Applications, All, Media Storage. Clear Cache and Clear Data, fo...