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.
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