Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis slower than sum(if(<>

Hi, I had a dashboard at customer site that used sum(if( for all the expressions. I thought it is a no-brainer to change all of them to proper set analysis. After doing so, surprisingly the chart calculation times are 5 times worse.

any idea why? Anyone has experienced this before?

Thanks,

Ram

5 Replies
oknotsen
Master III
Master III

Kinda hard to make this call without having a lot more information about the situation.

How much data are we talking about?

What were the expressions?

What did you turn them into?

Are you on the server? Did you clean the cache before doing a serious test?

Etc.

May you live in interesting times!
hic
Former Employee
Former Employee

If you have a moderate amount of data, this could happen. Set Analysis has an overhead, so it it first when you have large amounts of data that Set Analysis is the obvious choice.

See Performance of Conditional Aggregations

HIC

Not applicable
Author

In instances of large volumes of data, we find it much more optimal to move if/set analysis logic to the back-end script. This does however increase load time, but does decrease object calc times drastically.

But as Onno mentioned, it is only once a number of things are checked, can you make a call on which way to go.

Regards,

Pravesh

Not applicable
Author

Original expression:

SUM(If(Year=$(vSelectYear),SalesFlag*Value))/vRound    Calc time: 7578

Changed expression:

SUM({<Year={$(vSelectYear)}>}SalesFlag*Value)/vRound  Calc time: 32712

Set analysis is 4 times worse.

Cache is cleared.  i.e. Working set limits % Cache set to 0

Not applicable
Author

The data volume i am dealing with is not insiginificant at all. More than 100 million rows in the concatenated fact table, 24 GB of file size and I would have thought Set analysis here would have been of benefit.