• j-1064772 (1/19/2012)


    How do the newfangled Analytics functions compare with the Quirky Update method used for - among other things - creating running totals in term of performance ?

    The Analytic functions don't, but the OVER clause enhancements allows running totals with the SUM() function and the enhanced OVER clause. See my previous article: The OVER Clause enhancements in SQL Server code named “Denali”, CTP3.[/url] You might also want to see my blog post on this: http://blog.waynesheffield.com/wayne/archive/2011/08/running-totals-in-denali-ctp3/[/url]. In short, the QU still wins, but the newly enhanced OVER clause beats everything else.

    Did you click the "TSQL Challenges Winner" icon in my signature? It beat everything else quite handily doing a running total challenge.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2