February 9, 2006 at 1:37 am
I've always thought, maybe wrongly, that if you have two variations of the same query side by side in a proc ( for testing ) and one variation has say 70% and the other 30% it was a fair bet that the 30% version of the query was always the best option? ( or two variations of a stored procedure )
Intensive testing indicates that this is not necessarily true after examining cpu, duration and i/o in profiler.
Now I realise query cost is an optimiser calculation, but I'd sort of expect there to be some correlation between that cost value and the physical results.
I changed call sequence / cleared cache / did stats / etc. etc. to make sure it was only the statements that were different.
Anyone have any thoughts on query plan analysis variations?
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
February 9, 2006 at 10:26 am
The cost% is to be taken with a grain of salt.
Table scan, index scan... generally give a better indication.Usually the query with the fewest reads will be faster.
What was the major change in the execution plan?
Were there dynamic sql /temp tables involved?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply