Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Quirky Update in SQL 2012


Quirky Update in SQL 2012

Author
Message
karthik M
karthik M
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2045 Visits: 2582
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
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)

Group: General Forum Members
Points: 44948 Visits: 39860
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is usually not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Robb Melancon
Robb Melancon
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 110
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search