Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Quirky Update in SQL 2012 Expand / Collapse
Author
Message
Posted Saturday, October 06, 2012 3:22 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 1:43 AM
Points: 2,020, Visits: 2,515
All,

is the "Quirky Update" hole is still open in sql 2012 shop too? or is there any patch applied to close the hole?

if yes, what is the workaround for this? I remember Jeff mentioned in one of his interview this was closed. But i am not sure.




karthik
Post #1369400
Posted Saturday, October 06, 2012 9:41 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 10:21 PM
Points: 35,951, Visits: 30,235
karthik M (10/6/2012)
All,

is the "Quirky Update" hole is still open in sql 2012 shop too? or is there any patch applied to close the hole?

if yes, what is the workaround for this? I remember Jeff mentioned in one of his interview this was closed. But i am not sure.




Wayne Sheffield wrote a great blog article on it including some performance testing.
http://blog.waynesheffield.com/wayne/archive/2011/08/running-totals-in-denali-ctp3/

The "new" method for doing running totals is still slower than the Quirky Update method but not by a whole lot. Better than that, the new method is supported by MicroSoft which helps people avoid that queazy feeling they get when they don't understand something.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1369439
Posted Tuesday, September 10, 2013 7:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 31, 2014 11:50 AM
Points: 23, Visits: 98
Although the new functionality may help with running total, it does not help when trying to roll through a table being able to update a row based on values from the previous row. In other words, anything not aggregate based. Using the TransactionDetail example if I needed to calculate the daily and running performance from one day to the next, I would need to use the formula (Amount - YesterdayAmount) / YesterdayAmount to calculate each rows daily performance. QuirkyUpdate is the only viable/speedy way that I have found to do this.
Post #1493187
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse