Jeff Moden (11/22/2011)
Suresh Kumar Maganti (11/22/2011)
The Query cost (relative to the batch) was 17% for the one in the article. The same for the alternative version was 83%.The query cost relative to the batch actually doesn't mean much. It's quite easy to write queries that doe the same thing where one will be 100% of the batch and the other will be 0% and yet, when you run them, the 0% query take take several seconds where the 100% query runs so fast it almost isn't measureable.
I'm relatively new to SQL tuning. I haven't heard of that happening. Can you explain how or why that might happen? Thank you.