1 Reply Latest reply: Jul 26, 2017 5:13 AM by Stefan Wühl RSS

    optimization

    manoj kumar

      in Qlikview development practices showed (a/b)-1 has better performance than (a-1)/b. why for these two equations equal number of operations are perform but it says (a/b)-1 was better. suggest me what is the reason

        • Re: optimization
          Stefan Wühl

          I guess your second expression should be (a-b)/b

           

          If a and b are complex expressions themselves, like aggregations,

          the first expression (a/b)-1 only calculates two of these aggregations, while the second expression (a-b)/b calculates three (assuming no caching of b expression result involved, which is the case for Qlik AFAIK).