Optimization and Performance Considerations
- Use templates in business rules to avoid repeating sections of code and make best use of RTPs.
- Review dependencies on dynamic calc members within each calculation. If possible, change the calculation to avoid including repeated use of dynamic calc or remove the dynamic calc.
- Use FIX and IF statements to focus your calculation to ensure only the required data is calculated.
- Avoid the creation of a 0 (zero) data result, unless you want to see a zero; for example for inventory levels. This will create a block, which is included in all FIX and IF statements and is calculated. Remove zeros on data load, if possible, or prevent the creation of zeros in business rules.
- Try to avoid boolean logic within the IF statement used to check whether a condition exists. For
example,
replace:
with one of these statements, which gives the same result but avoids the use of boolean logic:IF (("Budget" ==#missing) OR ("Budget" ==0))
-
IF ("Budget" +1==1)
-
IF (Budget/Budget ==#missing)
-
- Where possible, perform dense calculations before performing sparse calculations. Dense calculations do not create blocks while sparse calculation do. While performing aggregations; for example, to get a total for an allocation calculation, ensure that you only aggregate the section of the data that is required for that allocation calculation.
- Minimize the passes on a database.
- Avoid recursive formulas. Excessive recursion can create performance issues and may require you to clear values to produce consistent results.
- For best practices to replace zero blocks and remove #missing blocks in BSO cubes to reduce database size, see Optimize BSO Cubes.