Sum() with appymap() in script results in memory leak?
Hi Everybody,
I try to reduce datasize of an existing QVD File by aggregating the data. I do something like this:
MapData: MAPPING LOAD FINE_FIELD, MAIN_FIELD; LoadYears: LOAD * INLINE [ FINE_FIELD, MAIN_FIELD E453, A B554, A B654, A G655, B 876, B ];
Data: LOAD SUM(Amounta) as AmountA, SUM(AmountB) As AmountB, OtherData, anotherData, applymap ('MapData', FINE_FILED) AS MAIN_FIELD RESIDENT SrcTable GROUP BY OtherData, anotherData applymap ('MapData', FINE_FILED);
I do this with large Tables with around 3 Mio Rows. Dispite this takes a long time calculating, it also consumes a lot of memory. (Around 10 times as much as for the non aggregated table). When I tried this aggregation with 27 Mio Records our QV Server reaches memory limits and the script fails.
What is the recomended way for aggregation in QV Script?