Page 1 of 1

Use of recalculation in aggregator stage

Posted: Sat Jan 28, 2012 2:02 am
by zulfi123786
What is the advantage of the option "recalculation" in the aggregator stage ?
Looks like it does the same thing as normal aggregation, is it only to avoid repartitioning and resorting on the same keys ?

Re: Use of recalculation in aggregator stage

Posted: Tue Feb 14, 2012 10:12 am
by felixyong
Look at Pg 224 of Parallel Job Developer Guide for V8.5 give you a good example on the usage of Re-calculation.

Posted: Tue Feb 14, 2012 1:23 pm
by zulfi123786
Thanks for the reference but I don't have 8.5 mannuals yet, still running on 8.1. Is the same documented in 8.1 ?
I have definitely read an example in the guide of 8.1 (not sure if it's the same example you are referring to), it demonstrates how recalculation should be implmented but my question is "from what is documented it's clear that recalculation could be achieved using calculation mode in the following aggregator then what benefits does recalculation offer over to calculation mode"

Posted: Tue Feb 14, 2012 8:10 pm
by qt_ky
"Re-calculation allows you to apply aggregate functions to a column that has already been summarized." - Parallel Job Developer's Guide

Posted: Wed Feb 15, 2012 6:02 am
by zulfi123786
qt_ky wrote:"Re-calculation allows you to apply aggregate functions to a column that has already been summarized." - Parallel Job Developer's Guide
Agreed ! but why is there a need to provide an option of "recalculate" in the downstream aggregator stage when the same can be achieved using calculate option of the downstream aggregator stage ?

Posted: Wed Feb 15, 2012 8:29 am
by qt_ky
It's implied that it will save on processing. My imagination tells me that suppose you were tracking some total count and every day you had new data to add to the count, you could use recalculate to add the delta rather than calculating all days every day.

Posted: Wed Feb 15, 2012 9:42 am
by pandeesh
qt_ky wrote: My imagination tells me that suppose you were tracking some total count and every day you had new data to add to the count, you could use recalculate to add the delta rather than calculating all days every day.
Your imagination seems good. But i am not able to imagine how we can implement this in real time using recalculation. :)

Posted: Wed Feb 15, 2012 3:25 pm
by ray.wurlod
Think about the possibility of updating shrunken (summarised) fact tables.