Example Business Rule
-
In this example, we added five year-to-date members to the Account dimension: "4110_UTD", "4120_YTD", "4130_YTD", "4140_YTD", "4150_YTD". We then created a business rule:
This business rule calculates two YTD accounts and then aggregates the values through the Product and Entity dimensions.
-
Looking at the log messages with Pass Only selected, we can see that most of the rule time is taken with the first pass.
-
Deselecting Pass Only allows us to see the number of block reads/writes in the pass1 section of the logs.
-
Reviewing the syntax, we can see that the calculation does not have a fix on Entity and Product; therefore, all of the rule is being performed on all the levels of Entity and Product. There is not requirement to calculate upper levels in pass1 because these will be overwritten by the AGG statement in the second pass anyway.
-
The rule is reviewed and an extra Fix statement is added to add lev0 of Entity and Product to Pass1.
-
The rule is then run again.
-
With the change, Pass1 still takes the longest time, but now is 20% faster because upper level blocks are no longer calculated unnecessarily. The overall calculation time also improves by 20%.
-
Deselecting Pass Only, we can see that the number of blocks, reads, and writes in the Pass1 section of the logs goes down after the change.
-
This reduces the reads and writes for the overall business rule (both passes), as we can see in the Activity Report.