THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Greg Low (The Bit Bucket: IDisposable)

Ramblings of Greg Low (SQL Server MVP, MCM and Microsoft RD) - SQL Down Under

Denali: Improved T-SQL Query Optimization

This blog has moved! You can find this content at the following new location:

Published Sunday, September 11, 2011 3:05 PM by Greg Low

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Dave Ballantyne said:

Hi Greg,

I inherently distrust the Query Cost relative to batch to be anywhere near accurate, especially where scalar functions (user defined or not) are involved.

What is the estimated cost of the LAG function within the plan ? , I would bet that it is a lot less than its real cost.

Do the io counters in profiler show the same ratio of costs ?

September 11, 2011 3:48 AM

John Alan said:

I agree, only back-to-back profiler figures are reliable enough in my experience

September 12, 2011 2:03 AM

Greg Low said:

Hi Dave/John,

I totally agree but in the case of these window functions, we've seen a real difference in the plans generated and they are much, much cleaner in how they work.

The real sweet spot seems to be any sort of running totals, which are otherwise an exponentially bad problem as the number of rows increases. And with the window functions, they just perform consistently.



September 12, 2011 3:43 AM

noeld said:

Posting "elapsed times" would be much better(trustworthy) way to compare.

September 12, 2011 2:29 PM

Leave a Comment


This Blog



No tags have been created or used yet.


Privacy Statement