Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Quick question about aggr function

I've got problem with memory in my aplication. I'm wondering how much the aggr function (is used about 5-10 times in tables) is allocating so much memory.

This is example of using aggr function


sum(aggr(nodistinct (sum(SAP_PLN)/sum(SAP_ilosc)*if(Match(Left(BW_AUFTR_STKL.BOM_PRODUKT,1),'1','2','4')>0,sum(BW_AUFTR_STKL.STL_QM/(1-GLA)),sum(BW_AUFTR_STKL.STL_LFM))),BW_AUFTR_POS.PROD_ID,ID_POZYCJI,BW_AUFTR_STKL.BOM_PRODUKT)*BW_AUFTR_POS.PP_MENGE)


1 Reply
johnw
Champion III
Champion III

I think of the aggr() function as creating a little temporary table of its own. So it's like you've created a new table with three dimensions and a fairly complicated expression. And you do this for every row in your original table. If QlikView processes these temporary tables one at a time in sequence, then it would just use as much memory as if you built the table yourself and selected the values for that specific row in your original table. But for all I know, QlikView may try to create a lot of these temporary tables in parallel, which could eat up a lot more memory. I don't really know how it's behaving internally.