<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Denali: Improved T-SQL Query Optimization</title><link>http://sqlblog.com/blogs/greg_low/archive/2011/09/11/denali-improved-t-sql-query-optimization.aspx</link><description>Part of the value in the ongoing evolution of the T-SQL language is that we are moving further and further towards being declarative rather than prescriptive ie: we are able to tell SQL Server what we want, rather than how to do it. Over time, that raises</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Denali: Improved T-SQL Query Optimization</title><link>http://sqlblog.com/blogs/greg_low/archive/2011/09/11/denali-improved-t-sql-query-optimization.aspx#38390</link><pubDate>Sun, 11 Sep 2011 07:48:48 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38390</guid><dc:creator>Dave Ballantyne</dc:creator><description>&lt;p&gt;Hi Greg, &lt;/p&gt;
&lt;p&gt;I inherently distrust the Query Cost relative to batch to be anywhere near accurate, especially where scalar functions (user defined or not) are involved.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Do the io counters in profiler show the same ratio of costs ?&lt;/p&gt;</description></item><item><title>re: Denali: Improved T-SQL Query Optimization</title><link>http://sqlblog.com/blogs/greg_low/archive/2011/09/11/denali-improved-t-sql-query-optimization.aspx#38399</link><pubDate>Mon, 12 Sep 2011 06:03:46 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38399</guid><dc:creator>John Alan</dc:creator><description>&lt;p&gt;I agree, only back-to-back profiler figures are reliable enough in my experience&lt;/p&gt;</description></item><item><title>re: Denali: Improved T-SQL Query Optimization</title><link>http://sqlblog.com/blogs/greg_low/archive/2011/09/11/denali-improved-t-sql-query-optimization.aspx#38401</link><pubDate>Mon, 12 Sep 2011 07:43:33 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38401</guid><dc:creator>Greg Low</dc:creator><description>&lt;p&gt;Hi Dave/John,&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Greg&lt;/p&gt;
</description></item><item><title>re: Denali: Improved T-SQL Query Optimization</title><link>http://sqlblog.com/blogs/greg_low/archive/2011/09/11/denali-improved-t-sql-query-optimization.aspx#38413</link><pubDate>Mon, 12 Sep 2011 18:29:44 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38413</guid><dc:creator>noeld</dc:creator><description>&lt;p&gt;Posting &amp;quot;elapsed times&amp;quot; would be much better(trustworthy) way to compare.&lt;/p&gt;</description></item></channel></rss>