February 7, 2012 at 12:08 am
I am new at sql and i had some of the sql queries ,but i dont know which query is the best query
for my server or the best optimized query. Can anyone help how to know the best optimized query??
February 7, 2012 at 1:51 am
If you have multiple queries and you want to see which is best, run them and time them, it's that simple. Use STATISTICS TIME.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 7, 2012 at 5:48 am
Also use STATISTICS IO and compare the number of reads and writes. Do that in addition to measuring time. Both are applicable.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply