3 Replies Latest reply: Aug 14, 2009 3:13 AM by Michael Solomovich RSS

    Set Analysis and calculation caching

    Michael Solomovich

      I've got the impression that calculations that use set analysis are not cached, that is, they're recalculated every time with the same selection.
      I created two identical charts where the difference is that one chart is using if condition, and another chart is using set analysis. Charts are on the separate tabs. The chart with "if" calculates only once per selection change, while the "set analysis" chart recalculates every time I switch between the tabs.
      Set analysis chart performs a little faster, but this advantage is questonable because of no caching...

      I'm wondering if anyone else have noticed this. If yes, is there something that can be done?

        • Set Analysis and calculation caching
          John Witherspoon

          I'm either not understanding or not seeing what you're seeing (version 8.5). My worst page of set analysis charts takes a horrifying 45 seconds to fully render for my worst case selections. Change a selection, wait another half a minute to render. Change the selection back, and the original data reappears immediately. Swap to another tab, swap back, and it again reappears immediately. I have no explanation other than that the original charts have been cached.

          Also, a caching difference between IF and set analysis doesn't make sense to me. I would expect QlikView to be caching the values displayed in a given chart for given selections. I wouldn't think it would make any difference HOW the values in the chart got calculated, only WHAT the values are. But I do keep completely misguessing how QlikView behaves internally, so I might be putting my foot in my mouth again.

           

            • Set Analysis and calculation caching
              John Witherspoon

              Some information related to this from QlikTech:

              "[Set analysis] performance is also dependant on how the data is used; if set's are re-used by users, which very often is the case, performance are dramatically increased. Cached sets is very important to be aware of."

              While this email wasn't actually in regards to caching results (I assume those are cached as well), it does say that SETS are cached. That's better than I'd even hoped for. I was guessing that what they did was basically sort the sets, so if you use the same set five times on a tab, it would only calculate the set once. But if you switched to another tab, then back, it would have to recalculate the set. Instead or in addition, they appear to use set caching. I consider that very good news, at least for performance. Perhaps not so much for memory usage, but I generally think of memory as cheap and CPU as expensive, at least once you're on a 64-bit system.

                • Set Analysis and calculation caching
                  Michael Solomovich

                  Thanks for follow-up John,
                  I've resolved the issue by adding a field in data model that is built using the same conditions as was used in the expressions, and using the filed as dimension in the chart.
                  Later I tried to re-create the set analysis chart, and this time caching was working, and performance was perfect. I'm really puzzled now, because it was very well visible absolutely consistent. Next time, if I ever get this again, I'll save a copy.