In This Section:
If data blocks are much larger than 100 KB, Intelligent Calculation does not work effectively. See Understanding Intelligent Calculation.
To optimize calculation performance and data storage, balance data block density and data block size by rearranging the dense and sparse dimension configuration of the database. Keep these suggestions in mind:
You may improve calculation performance by changing the order of standard (not attribute) sparse dimensions in the database outline. Order standard sparse dimensions by the number of members they contain, placing the dimension that contains the fewest members first. This arrangement provides many possible improvements, depending on the site:
The calculator cache functions more effectively, providing approximately a 10% performance improvement if you have a database outline with a large dimension (for example, one containing 1000 members).
To optimize calculation performance when you load data incrementally, make the dimension tagged as time a sparse dimension. If the time dimension is sparse, the database contains a data block for each time period. When you load data by time period, Essbase accesses fewer data blocks because fewer blocks contain the relevant time period. Thus, if you have Intelligent Calculation enabled, only the data blocks marked as dirty are recalculated. For example, if you load data for March, only the data blocks for March and the dependent parents of March are updated.
However, making the time dimension sparse when it is naturally dense may significantly increase the size of the index, creating possibly slower performance due to more physical I/O activity to accommodate the large index.
If the dimension tagged as time is dense, you still receive some benefit from Intelligent Calculation when you do a partial data load for a sparse dimension. For example, if Product is sparse and you load data for one product, Essbase recalculates only the blocks affected by the partial load, although time is dense and Intelligent Calculation is enabled.
For information on incremental loads, see Loading Data into Aggregate Storage Databases.
Calculation performance may be affected if a database outline has multiple flat dimensions. A flat dimension has very few parents, and each parent has many thousands of children; in other words, flat dimensions have many members and few levels.
You may achieve significant improvements in calculation performance by carefully grouping formulas and dimensions in a calculation script. In this way, you can ensure that Essbase cycles through the data blocks in the database as few times as possible during a calculation.
Order commands in calculation scripts to make the database calculation as simple as possible. Consider applying all formulas to the database outline and using a default calculation (CALC ALL). This method may improve calculation performance.
SET MSG DETAIL also provides an information message every time Essbase calculates a data block. SET MSG DETAIL is useful for reviewing the calculation order of data blocks and for testing intelligent recalculations.
Because SET MSG DETAIL causes a high processing overhead, use it only during test calculations.
You can use the SET NOTICE calculation command in a calculation script to display calculation completion notices that tell you what percentage of the database has been calculated. You can use the SET MSG SUMMARY command with the SET NOTICE command to show calculation progress between completion notices. Completion notices do not significantly reduce calculation performance, except when used with a very small database.
You can simulate a calculation using SET MSG ONLY in a calculation script. A simulated calculation produces results that help you analyze the performance of a real calculation that is based on the same data and outline.
By running a simulated calculation with a command such as SET NOTICE HIGH, you can mark the relative amount of time each sparse dimension takes to complete. Then, by performing a real calculation on one or more dimensions, you can estimate how long the full calculation will take, because the time a simulated calculation takes to run is proportional to the time that the actual calculation takes to run.
For example, if the calculation starts at 9:50:00 AM, and the first notice is time-stamped at 09:50:10 AM and the second is time-stamped at 09:50:20 AM, you know that each of part of the calculation took 10 seconds. If you then run a real calculation on only the first portion and note that it took 30 seconds to run, you know that the other portion also will take 30 seconds. If there were two messages total, then you would know that the real calculation will take approximately 60 seconds (20 / 10 * 30 = 60 seconds).
To perform a simulated calculation:
Create a data model that uses all dimensions and all levels of detail about which you want information.
Load all data. This procedure calculates only data loaded in the database.
Create a calculation script with these entries:
SET MSG ONLY; SET NOTICE HIGH; CALC ALL;
Run the script.
Find the first sparse calculation message in the application log and note the time in the message.
Note the time for each subsequent message.
Calculate the dense dimensions of the model that are not being dynamically calculated:
CALC DIM (DENSE_DIM1, DENSE_DIM2, …);
Calculate the sparse dimensions of the model:
CALC DIM (SPARSEDIM1, SPARSEDIM2, …);
Project the intervals at which notices will occur, and then verify against sparse calculation results. You can then estimate calculation time.
To estimate total calculation time:
Note the times of all the intervals between application log messages generated by SET NOTICE HIGH.
See Table 118.
Use the following calculation to estimate the time for a real calculation:
Table 118. Sample Intervals Between Log Messages
When these factors are present, this estimating technique more closely predicts calculation time when Essbase reaches 30%–40% of the simulated calculations (30%–40% of the messages generated by SET NOTICE HIGH).See the Oracle Essbase Technical Reference.
Using SET MSG ONLY as a calculation-time estimating technique should be validated against later CALCNOTICE intervals. The results of this estimating technique vary because of the following chain of influences:
Another factor that can make actual results diverge significantly from predicted is the outline structure. Calculations based on CALCNOTICE intervals assume evenly balanced processing time throughout the outline. Factors that can skew this balance include the following situations:
To estimate the database size resulting from a calculation using interactive mode:
Load data and issue a CALC ALL command and note the average block size.
Start the MaxL shell, log into Essbase, and start an application and database.
essmsh login username password; alter system load application appname; alter application appname load database dbname;
Providing the application and database name, enter the following MaxL statement and note the value that is returned for the number of blocks.
query database appname.dbname get estimated size;
Multiply the number of blocks by the average size of the blocks in the database.
If you need to estimate partitions, you must query Essbase for a database size estimate on every partition and add the results. If you query for the size of only the source database, the estimate includes only the data on the source database server.
Serial calculation is the default. With serial calculation, each calculation pass is scheduled to run on a single processor. If invoked from a calculation script, the calculations are executed sequentially in the order in which they appear in the calculation script.
Parallel calculation breaks each calculation pass into sub-tasks. The sub-tasks that can run independently of one another are scheduled to run simultaneously on up to four threads. Each thread may be on a different processor.
To change from the default serial calculation to parallel calculation, change, at most, two configuration settings and restart the server, or add an instruction to the calculation script.
Essbase analyzes the outline and the calculation requested for each calculation pass. Remember that one calculation may require multiple passes. Some situations may create the need for multiple passes, including dynamic calculation, the presence of a member tagged as two-pass, or calculations that create certain kinds of interdependencies. See Calculation Passes.
If Essbase determines that parallel calculation is possible, Essbase splits the calculation into smaller tasks that are independent of each other. During the calculation, Essbase performs the smaller tasks simultaneously.
However, Essbase uses serial calculation even if parallel calculation is enabled if there are complex interdependencies between formulas that participate in the pass. Such interdependencies render parallel calculation impossible.
Outline structure and application design determine whether enabling parallel calculation can improve calculation performance. Before you enable parallel calculation, review the following guidelines, which will help you get the full benefit of parallel calculation:
Use the uncommitted access isolation level. Parallel calculation is not supported if you use the committed access isolation level. See Uncommitted Access.
One or more formulas present in a calculation may prevent Essbase from using parallel calculation even if it is enabled. For a description of formulas that may force serial calculation regardless of parallel calculation settings, see Formula Limitations.
Calculation tasks are usually generated along the last sparse dimension of an outline. Order the sparse dimensions in an outline from smallest to largest, based on actual size of the dimension as reported by the ESSCMD command GETDBSTATS. This ordering recommendation is consistent with recommendations for optimizing calculator cache size and consistent with other outline recommendations. For a description of situations that may need to use additional dimensions (more than the last sparse dimension) and for instructions on how to increase the number of sparse dimensions used, see Identifying Additional Tasks for Parallel Calculation.
Transparent partitions if the calculation occurs at the target database. The number of sparse dimensions specified by CALCTASKDIMS in the essbase.cfg file or by SET CALCTASKDIMS in a calculation script must be set at 1 (the default value). For information on limitations imposed by the use of parallel calculation with transparent partitions, see Transparent Partition Limitations; for information on using CALCTASKDIMS or SET CALCTASKDIMS, see Identifying Additional Tasks for Parallel Calculation.
Placing the largest sparse dimension at the end of the outline for maximum parallel calculation performance may slow retrieval performance. See Optimizing Query Performance.
A formula on a dense member, including all stored members and any Dynamic Calc members upon which a stored member may be dependent, that causes a dependence on a member of the dimension that is used to identify tasks for parallel calculation.
A sparse dimension member formula using @XREF, and the dimension for the sparse member is fully calculated. @XREF does not force serial calculation when it is on dense Dynamic Calc members that are not dependent on other stored members during the batch calculation.
A member formula that causes a circular dependence. For example, member A has a formula referring to member B, and member B has a formula referring to member C, and member C has a formula referring to member A.
A sparse dimension member formula that contains references to members from other sparse dimensions.
If you need to use a formula that might prevent parallel calculation, you can either mark the member of the formula as Dynamic Calc or exclude it from the scope of the calculation. To see whether a formula is preventing parallel calculation, check the application log. For relevant error messages, see Monitoring Parallel Calculation.
At the start of a calculation pass, Essbase checks the calculator cache size and the degree of parallelism and then uses the calculator cache bitmap option appropriate for maximum performance. Therefore, the bitmap option used for parallel calculation may be different from that used for serial calculation.
For example, assume Essbase performs a serial calculation and uses multiple bitmaps and a single anchoring dimension. Without explicit change of the calculator cache size, Essbase might perform a parallel calculation using only a single bitmap and a single anchoring dimension.
Multiple bitmap mode calculator cache memory usage has a limit of  bitmaps.
When using parallel calculation in multiple bitmap mode, you may encounter high memory usage. If so, you can use the configuration setting PARCALCMULTIPLEBITMAPMEMOPT to optimize memory use in multiple bitmap mode. This setting can be used with, or separately from, MULTIPLEBITMAPMEMCHECK. To enable PARCALCMULTIPLEBITMAPMEMOPT, add the following line to your essbase.cfg file:
You must increase the calculator cache so that multiple bitmaps can be used. You can identify the calculator cache mode that controls the bitmap options by checking the application log at the start of each calculation pass for an entry similar to the following:
Multiple bitmap mode calculator cache memory usage has a limit of  bitmaps.
Essbase checks the commit threshold specified by the database setting “Number of blocks before internal commit.” If the setting requires that less than 10 MB of data be written before an internal commit, then Essbase automatically increases the commit threshold for the duration of the calculation pass to 10 MB. If the setting is greater than 10 MB, Essbase uses the setting value.
If you can allocate more than 10 MB extra disk space for calculation, consider increasing the commit threshold value; that is, the number of blocks before a commit, to a very large number for better performance.
To view the current threshold, use a tool:
To modify the commit threshold, use a tool:
See Uncommitted Access.
To set the isolation level to uncommitted mode, use a tool:
See Uncommitted Access.
To check whether parallel calculation has been enabled in the server configuration file:
Setting parallel calculation at the server level enables it for all calculations performed on all applications and databases on the server. You can disable parallel calculation for individual applications or databases by setting parallel calculation at the server level in the configuration file and then adding application-specific or database-specific entries in a calculation script.
To enable parallel calculation:
If you plan to enable parallel calculation in the configuration file, check the current status to see whether an entry exists.
Use the process described in Checking Current Parallel Calculation Settings.
Add or modify CALCPARALLEL in the essbase.cfg file on the server, or add SET CALCPARALLEL to a calculation script.
If needed, enable Essbase to use more than the one sparse dimension to identify tasks for parallel calculation.
Use the process described in Identifying Additional Tasks for Parallel Calculation.
If you added entries to the configuration file, restart the server.
Run the calculation.
Oracle recommends that you set the value of CALCPARALLEL to be one less than the number of processors available for calculation. This extra processor can then be used by either the operating system or by the Essbase process responsible for writing out dirty blocks from the cache.
By default, Essbase uses the last sparse dimension in an outline to identify tasks that can be performed concurrently. But the distribution of data may cause one or more tasks to be empty; that is, there are no blocks to be calculated in the part of the database identified by a task. This situation can lead to uneven load balancing, reducing parallel calculation effectiveness.
To resolve this situation, you can enable Essbase to use additional sparse dimensions in the identification of tasks for parallel calculation. For example, if you have a FIX statement on a member of the last sparse dimension, you can include the next-to-last sparse dimension from the outline as well. Because each unique member combination of these two dimensions is identified as a potential task, more and smaller tasks are created, increasing the opportunities for parallel processing and improving load balancing.
If you are not sure, verify whether parallel calculation is enabled.
See Checking Current Parallel Calculation Settings. Without CALCPARALLEL (or SET CALCPARALLEL in a calculation script), CALTASKDIMS has no effect.
Add or modify CALCTASKDIMS in the essbase.cfg file on the server, or use the calculation script command SET CALCTASKDIMS at the top of the script.
See the Oracle Essbase Technical Reference.
If you add or modify CALCTASKDIMS in the essbase.cfg file on the server, restart Essbase.
If you are using a calculation script, run the script.
To view the application log, see “Viewing Logs” in the Oracle Essbase Administration Services Online Help.
Calculating in parallel with n threads
Formula on ((or backward dependence from) mbr memberName prevents calculation from running in parallel.
memberName represents the name of the member where the relevant formula exists. You can look in the application log for such messages and consider removing the formula or, if possible, tagging the relevant member or members as Dynamic Calc so they do not feature in the calculation pass.
Calculation task schedule [576,35,14,3,2,1]
[Tue Jun 27 12:30:44 2007]Local/CCDemo/Finance/essexer/ Info(1012681) Empty tasks [291,1,0,0,0,0]
If the ratio of empty tasks to the tasks specified in the calculation task schedule is greater than 50% (for example, 291 / 576), parallelism may not be giving you improved performance because of the high sparsity in the data model.
You may achieve significant improvements in calculation performance by carefully using formulas in the database outline. For example, you may achieve improved calculation performance by placing formulas on members in the database outline instead of placing the formulas in a calculation script. See Developing Formulas.
Using the database outline to roll up values is more efficient than using a formula to calculate values. For example, consider the consolidation on the Sample.Basic database outline in Figure 159, Consolidation on Sample.Basic Outline.
100-10 + 100-20 + 100-30
If you use a simple formula, and block size is not unusually large, you can place the formula on a member of either a sparse or a dense dimension without significantly affecting calculation performance. The bigger the block size, the more impact simple formulas have on calculation performance. For a discussion of the relationship between block size and calculation performance, see Block Size and Block Density.
Does not use relationship or financial functions. For example, a simple formula cannot use @ANCESTVAL, @NEXT, @PARENTVAL, @SHIFT, @ACCUM, or @GROWTH. For a complete list of relationship and financial functions, see the Oracle Essbase Technical Reference.
For information on how formulas affect calculation performance, see Bottom-Up and Top-Down Calculation.
Use the FIX command in a calculation script to calculate only required data blocks. See Using the FIX Command.
Increase the density of the database (ratio of existing data blocks to possible data blocks). See Block Size and Block Density.
Uses relationship or financial functions; for example, @ANCESTVAL, @NEXT, @PARENTVAL, @SHIFT, @ACCUM, or @GROWTH. For a complete list of relationship and financial functions, see the Oracle Essbase Technical Reference.
When applied to sparse dimension members, complex formulas create more calculation overhead and therefore slow performance. This problem occurs because the presence of complex formulas requires Essbase to perform calculations on all possible as well as all existing data blocks related to the member with the complex formula. The presence of a relationship or financial function on a sparse dimension member causes Essbase to perform calculations on all blocks, possible as well as existing, increasing the overhead even more.
For a discussion about how complex formulas affect calculation performance, see Bottom-Up and Top-Down Calculation.
If a database has 10 existing data blocks and 100 potential data blocks, the overhead is as much as ten times what it would be without the complex formula (depending on the outline structure and other factors), as many as 90 extra blocks to read and possibly write to.
You can use the SET FRMLBOTTOMUP calculation command to optimize the calculation of formulas in sparse dimensions in large database outlines. With this command, you can force a bottom-up calculation on sparse member formulas that otherwise would be calculated top-down. See Forcing a Bottom-Up Calculation.
Forcing a bottom-up calculation on a top-down formula enables efficient use of the CALC ALL and CALC DIM commands. Review the discussions of the SET FRMLBOTTOMUP calculation command and the CALCOPTFRMLBOTTOMUP configuration setting in the Oracle Essbase Technical Reference.
California = 120;
In this formula, California is a member in a sparse dimension and 120 is a constant value. Essbase automatically creates all possible data blocks for California and assigns the value 120 to all data cells. Many thousands of data blocks may be created. To improve performance, create a formula that does not create unnecessary values.
To assign constants in a sparse dimension to only those intersections that require a value, use FIX in a manner similar to the following example:
FIX(Colas,Misc,Actual) California = 120; ENDFIX
In this example, Colas is a member of the sparse dimension, Product; Actual is a member of the dense dimension, Scenario; and Misc is a member of the dense dimension, Measures. The value 120 is assigned to any intersection of California (in the Market dimension), Actual (in the Scenario dimension), Misc (in the Measures dimension), Colas (in the Product dimension), and any member in the Year dimension, because a specific member of Year is not specified in the script.
Because Sample.Basic includes only two sparse dimensions, this example affects only one block. If more sparse dimensions existed, Essbase would ensure data blocks for all combinations of the sparse dimensions with California and Colas, creating blocks if necessary. Within the new blocks, Essbase sets Measures and Scenario values (other than those assigned the value 120) to #MISSING.
If you assign nonconstant values to members of a sparse dimension, blocks are created based on the Create Blocks on Equations setting. The Create Blocks on Equations setting is defined at the database level, as a database property. Within calculation scripts, you can temporarily override the Create Blocks on Equations setting. (See Nonconstant Values.)
Consider the effects of the following calculation when West does not have a value and the Create Blocks on Equations setting is ON.
West = California + 120;
Unneeded blocks may be created for all sparse-member intersections with West, even if the corresponding block value is #MISSING for all of the children of West. Especially in a large database, creation and processing of unneeded blocks requires additional processing time.
To control creation of blocks when you assign nonconstant values to members of a sparse dimension, use the SET CREATEBLOCKONEQ ON | OFF command. The following script includes calculations with this setting off and then on:
FIX (Colas); SET CREATEBLOCKONEQ OFF West = California + 120; SET CREATEBLOCKONEQ ON East = “New York” + 100; ENDFIX
Because the Create Block on Equation setting is disabled at the beginning, West blocks are created only when values exist for the children of West. Later, because the Create Block on Equation setting is enabled, all blocks for East are created.
Using SET CREATEBLOCKONEQ affects only creation of blocks during the execution of the calculation script that contains this command. This command does not change the overall database Create Blocks on Equations setting.
For faster calculation script performance, use FIX in the calculation script to qualify the use of a formula rather than a formula that includes a cross-dimensional operator on the left of an equation.
FIX(Jan) Sales = Sales * .05; ENDFIX
Sales(Sales -> Jan = Sales -> Jan * .05;)
As Essbase cycles through the database, it calculates the formula for every member combination that includes a member from the dimension tagged as time (Jan, Feb, Mar, and so on), although only January combinations need to be calculated.
See Using the FIX Command and the Oracle Essbase Technical Reference.
FIX(Sales) Budget = Actual * 1.1; ENDFIX FIX(Expenses) Budget = Actual * .95; ENDFIX
Use the DATACOPY calculation command to create and then calculate the required blocks. See Using DATACOPY to Copy Existing Blocks.
FIX(Sales, Expenses) Budget (Sales = Sales -> Actual * 1.1; Expenses = Expenses -> Actual * .95;) ENDFIX
Formulas in a block storage outline can have dependencies on one another such that they cause a nested execution of formulas within one or more blocks. Such formulas are called recursive formulas. Sometimes recursive formulas result in large or unending loops that result in abnormal termination of the server.
To avoid abnormal termination, you can use the CALCLIMITEFORMULARECURSION configuration setting to stop a formula execution that reaches 31 execution levels. See the Oracle Essbase Technical Reference
A top-down calculation is less efficient than a bottom-up calculation, because more blocks are calculated than is necessary. Although a top-down calculation is less efficient than a bottom-up calculation, top-down calculations are necessary in some cases to ensure that calculation results are correct.
For a bottom-up calculation, Essbase determines which data blocks must be calculated before it calculates the database. Essbase then calculates only the blocks that must be calculated. The calculation begins with the existing block with the lowest block number and works up through each block in number order until the existing block with the highest block number is reached. See Block Calculation Order.
For simple formulas, Essbase does a bottom-up calculation to determine which blocks must be calculated before running the full calculation. For example, for a simple formula on a member (such as A = B + C), A is calculated only if B or C exists in the database. That is, the dependency of the formula on B and C is known before the calculation is started.
Before starting a calculation, Essbase searches the database outline and marks complex formulas that require top-down calculation; for example, a member formula that contains a cross-dimensional reference. When Essbase reaches a member with a top-down formula, it does a top-down calculation for the member.
When a formula on a member is complex, all possible blocks for the member must be examined to see if an existing block must be changed or a new block created; it is difficult to determine the dependency that blocks have on other blocks before the start of the calculation. The top-down method slows calculation performance because Essbase must search for appropriate blocks to calculate to execute the formula.
A = B -> D + C -> D
To force a bottom-up calculation, use a tool:
Forcing a bottom-up calculation on a formula usually increases performance time. If the formula contains complex functions (for example, range functions) or if the formula's dependencies are not straightforward, a bottom-up calculation may produce results different from those of a top-down calculation.
Before changing the setting CALCOPTFRMLBOTTOMUP or using the calculation script command SET FRMLBOTTOMUP in a production environment, check the validity of calculation results by comparing, relative to the same data, the results of a bottom-up calculation and the results of a top-down calculation.
The following section describes the caches that are used with block storage databases. For information about the aggregate storage cache, see Managing the Aggregate Storage Cache.
When calculating a database, Essbase uses approximately 30 bytes of memory per member in the database outline. So if the database has 5,000 members, Essbase needs approximately 150 KB of memory to calculate the database.
You can avoid excess memory use by combining calculation scripts. You can obtain good performance by using parallel calculation with a single calculation script. See Using Parallel Calculation.
Essbase uses memory to optimize calculation performance, especially for large calculations. The amount of memory used is not controllable, except by altering the size of the database outline. However, you can ensure that the memory cache sizes enable Essbase to optimize the calculation.
When you first calculate a database, the size of the calculator cache is significant for calculation performance. If possible, ensure that the calculator cache is large enough for Essbase to use the optimal calculator cache option.
See Sizing Caches. Read the entire topic before making changes.
When a block is calculated, Essbase locks the block and all blocks that contain the children of the block. Essbase calculates the block and then releases the block and the blocks containing the children.
By default, Essbase locks up to 100 blocks concurrently when calculating a block. This number of block locks is sufficient for most database calculations. If you are calculating a formula in a sparse dimension, Essbase works most efficiently if it can lock all required child blocks concurrently. Therefore, when calculating a formula in a sparse dimension, you may want to set a lock number higher than 100 if you are consolidating very large numbers of children (for example, more than 100). By increasing the number, you ensure that Essbase can lock all required blocks, and performance is not impaired.
For consolidations in a sparse dimension, block locking is not a consideration, because Essbase does not need to lock all blocks containing children concurrently.
You can use the SET LOCKBLOCK command in a calculation script along with the CALCLOCKBLOCK setting in the essbase.cfg file to specify the maximum number of blocks that Essbase can lock concurrently when calculating a block. If you do not modify the default setting, and the default 100 blocks is not sufficient during calculation, the calculation may require more time than expected.
Essbase uses the block locking system to manage concurrent access to users. This system ensures that only one user at a time can update or calculate a particular data block. How Essbase handles locking blocks and committing data depends on the isolation level setting.
When Essbase calculates a data block, it creates an exclusive lock; other users cannot update or calculate it, but they can have read-only access. When Essbase finishes the calculation, it releases the block. Other users can then update the block if they have the appropriate security access.
When a user is updating a data block, the block is locked. If a database calculation requires a data block that is being updated by another user, the calculation waits for one of the following conditions:
For information about security options, see Disconnecting Users and Terminating Requests in Native Security Mode and Managing Passwords and User Names in Native Security Mode.
You can improve performance significantly by tagging an accounts dimension member as two-pass in the database outline, if it is appropriate for the application. The combination of data and calculation needs may require the use of a calculation script to calculate a formula twice, instead of two-pass tagging, to preserve accuracy.
Use these sections to understand more about two-pass calculation. Decide whether you can tag an accounts dimension member as two-pass to improve performance, or whether you must use a calculation script to calculate a formula twice. This section also provides information about how to enable two-pass calculation or create a calculation script for two-pass calculation.
For information about the interaction of two-pass calculation and attribute members, see Table 18, Differences Between Attribute and Standard Dimensions.
Whenever possible, Essbase calculates two-pass formulas at the data block level, calculating the two-pass formulas at the same time as the main calculation. Thus, Essbase need not do an extra calculation pass through the database. However, in some situations, Essbase needs an extra calculation pass through the database.
How Essbase calculates the two-pass formulas depends on whether there is a dimension tagged as time as well as a dimension tagged as accounts and on the dense-sparse configuration of the time and account dimensions.
Profit % = Profit % Sales
Assume that the following table shows a subset of a data block with Measures and Year as dense dimensions. Measures is tagged as accounts, and Year is tagged as time. The AGGMISSG setting is turned off (the default).
Data values have been loaded into the input cells. Essbase calculates the shaded cells. The numbers in bold show the calculation order for the cells. Cells with multiple consolidation paths are darkly shaded.
For information on how cell calculation order depends on database configuration, see Cell Calculation Order.
Essbase calculates Profit % -> Qtr1 by adding the values for Profit % -> Jan, Profit % -> Feb, and Profit % -> Mar (7 above). This addition of percentages produces the value %125, not the correct result.
For information about multiple calculation passes, see Calculation Passes.
Two scenarios are described in detail in the following sections. If you are using Intelligent Calculation, use the scenario that matches the configuration of the database; each scenario tells you how to ensure that Essbase accurately calculates two-pass formulas.
These scenarios require that you understand the concepts of Intelligent Calculation. See Understanding Intelligent Calculation.
When you tag a member formula as two-pass in the outline, Essbase does the two-pass calculation while each data block is being calculated. However, when you repeat a formula in a calculation script, Essbase must read the data blocks and write them to memory to recalculate the formula.
Essbase calculates the database and then does an extra calculation pass to calculate the two-pass formulas. Even though all data blocks are marked as clean after the first database calculation, Essbase ignores the clean status on the blocks that are relevant to the two-pass formula and recalculates these blocks.
After the first calculation, Essbase has marked all data blocks as clean for the purposes of Intelligent Calculation. In a second calculation pass through the database, Essbase recalculates the required data blocks for the two-pass formulas. However, because the second calculation is a partial calculation of the database, Essbase does not mark the recalculated blocks as clean. When you recalculate the database with Intelligent Calculation turned on, these data blocks may be recalculated unnecessarily.
If the database configuration allows Essbase to use Scenario B, consider using a calculation script to perform two-pass formula calculations. If you use a calculation script, Essbase still does an extra calculation pass through the database; however, you can ensure that Essbase has marked all the data blocks as clean after the calculation. See Creating Calculation Scripts for Two-Pass and Intelligent Calculation.
Although tagging an accounts member as two-pass may bring performance benefits, some applications cannot use this method. Check these qualifications to see whether you should apply a two-pass tag or create a calculation script that performs a calculation twice for best performance and accuracy:
You can tag a member as two-pass if it is in a dimension tagged as accounts. When you perform a default calculation on the database, Essbase automatically recalculates any formulas tagged as two-pass if they are in the dimension tagged as accounts in the database outline.
You can tag a member as two-pass if it is a Dynamic Calc or Dynamic Calc and Store member of any dimension. See Dynamically Calculating Data Values.
You may need to use a calculation script to calculate a two-pass formula to obtain accurate results, even if the two-pass tag would provide performance benefits. See Creating Calculation Scripts for Two-Pass and Intelligent Calculation.
Use a calculation script instead of the two-pass tag to ensure efficient use of Intelligent Calculation. See Understanding the Interaction of Two-Pass Calculation and Intelligent Calculation.
You must use a calculation script to calculate a formula twice if the database configuration means that Essbase uses Scenario A, as described in Scenario A, and if the formula references values from another data block.
You may want to use a calculation script to calculate two-pass formulas if the database configuration means that Essbase uses Scenario B, as described in Scenario B.
A database setting enables two-pass calculation in default calculations. When you perform a default calculation on a database with two-pass calculation enabled (the default setting), Essbase automatically attempts to calculate formulas tagged as two-pass in the dimension tagged as accounts in the database outline. This is true even if you have customized the default calculation script.
To perform a default calculation, use a tool:
Before the calculation script command that recalculates a two-pass formula, add the SET UPDATECALC OFF command to disable Intelligent Calculation. If you have Intelligent Calculation enabled (the default), Essbase calculates only the data blocks that are not marked as clean, but when you perform a default calculation of the database with Intelligent Calculation enabled, all data blocks are marked as clean, so Essbase does not perform the two-pass formula recalculation.
If you have changed the default calculation of CALC ALL, and Intelligent Calculation is enabled, the data blocks may not be marked as clean after the first calculation. See Understanding Intelligent Calculation. Also see “Setting Default Calculations” in the Oracle Essbase Administration Services Online Help.
To obtain the performance benefits of Intelligent Calculation when performing the first, full calculation of the database, use one of these methods, depending on the calculation needs and outline structure:
The outline has a dimension tagged as accounts, and it is a dense dimension. You want to calculate sales for each product as a percentage of sales for all products. Assume this formula should calculate the dimension:
Sales % Sales -> Product
When Essbase calculates the data block for each product, it has not yet calculated the value Sales -> Product, so the results for the sales of each product as a percentage of total sales are incorrect.
Mark the recalculated blocks as clean, even though this calculation is a partial calculation of the database. If you do not use the command SET CLEARUPDATESTATUS AFTER, Essbase marks data blocks as clean only after a full calculation of the database.
SET UPDATECALC ON; CALC ALL; SET UPDATECALC OFF; SET CLEARUPDATESTATUS AFTER; "Share of Sales" = Sales % Sales -> Product;
To tag a member as two-pass, and use a calculation script to calculate first the full database, then the two-pass member:
Place a formula in the database outline and tag it as two-pass.
Place the formula on the appropriate member in the dimension tagged as accounts, in our example, Share of Sales.
Create a calculation script that performs a full database calculation and then a two-pass calculation:
SET UPDATECALC ON; CALC ALL; SET UPDATECALC OFF; SET CLEARUPDATESTATUS AFTER; CALC TWOPASS;
To perform a default calculation from a client and then use a calculation script to perform the formula calculation:
Enable Intelligent Calculation, if this default has been changed.
Perform a full calculation, using any of the tools listed in Table 119, Methods for Performing a Full Calculation .
Use a calculation script similar to this example to disable Intelligent Calculation and calculate the formula:
SET UPDATECALC OFF; SET CLEARUPDATESTATUS AFTER; "Share of Sales" = Sales % Sales -> Product;
SET UPDATECALC OFF; SET CLEARUPDATESTATUS AFTER; CALC TWOPASS;
Create a calculation script to calculate the database, but tell Essbase not to mark the calculated data blocks as clean.
SET CLEARUPDATESTATUS OFF; CALC ALL; CALC TWOPASS; SET CLEARUPDATESTATUS ONLY; CALC ALL;
The SET CLEARUPDATESTATUS OFF command tells Essbase not to mark the calculated data blocks as clean.
The first CALC ALL command causes Essbase to cycle through the database, calculating all dirty data blocks. Essbase does not mark the calculated data blocks as clean. Essbase does not automatically recalculate the formulas tagged as two-pass in the database outline.
The CALC TWOPASS command causes Essbase to cycle through the database, recalculating the formulas that are tagged as two-pass in the dimension tagged as accounts in the database outline. Essbase recalculates the formulas because the required data blocks are not marked as clean by the previous CALC ALL. Essbase does not mark the recalculated data blocks as clean.
The SET CLEARUPDATESTATUS ONLY command tells Essbase to mark the data blocks as clean but not to calculate the data blocks. This command disables calculation.
The last CALC ALL command causes Essbase to cycle through the database and mark all the data blocks as clean. Essbase searches the index and marks the data blocks as clean. It does not calculate the data blocks.
Queries and calculations that reference a member that has been tagged as Dynamic Calc or Dynamic Calc and Store may be significantly slower than queries and calculations involving the same members, if the member has formulas involving any of these functions:
The @XREF function pulls information from one database to another; for example, to get inflation rates from a different database than the database containing the sales data to be calculated. (See the Oracle Essbase Technical Reference.) Accessing data across databases in different applications can involve multiple data transfers, increasing performance time. Depending on size characteristics of the referenced database, using reference cubes can decrease data transfer time.
The @XREF function is executed in a calculation on the target database. The @XREF syntax identifies the source database containing the desired information, and a member list statement that qualifies what member information is needed from the source database. When reference cubes are created, a copy of the source database is copied to the memory with the target (requesting) database. By associating the information with the target database, the number of data transfers is minimized, improving performance.
Depending on the volatility of the source data values and how @XREF is used, two types of reference cubes are available: active and passive. A creation parameter defines a reference cube as active or passive.
Use active reference cubes when the source data is relatively stable or when @XREF is included in dynamic calculations on the target database. When an active reference cube is loaded to the target (written to memory), the reference cube is registered with the source database so that source database changes can update reference cube values dynamically. Unloading or deleting a reference cube deregisters it.
Passive reference cubes are not registered, because the source database does not dynamically update passive reference cubes with value changes. Use passive reference cubes when source data values change frequently or when the @XREF function is used in batch calculations on the target database. Once a passive reference cube has been created and loaded, it gets refreshed at the start of every batch calculation.
If an @XREF function associated with a dynamically calculated target member references a passive reference cube, the reference cube is ignored, and the @XREF request goes directly to the source database.
The following features and situations do not support reference cubes:
Aliases. Use actual member names, not aliases.
Duplicate member names
Dynamic Time Series members
The presence of attribute dimensions on the source database
LROs within the reference cube data
Cascading changes through a series of active reference cubes. For example, database A uses database B as a reference cube source. Database B uses database C as a reference cube source. Change updates on data from database C update database B reference cubes. However, if the updated values on database B affect a reference cube on database A, database A is not updated.
A reference cube probably will not improve @XREF performance when the referenced database has any of the following characteristics:
Any dimension contains more than 100 members
More than four or five dimensions exist
Total database contains more than 1,000,000 cells
The referenced slice is less than 10%–20% of the referenced cube size (applies to passive reference cubes)
Before a reference cube can be used, it must be created and loaded. Creating a reference cube defines the source database and member content of the reference cube. Creating a reference cube also loads it. You can unload a reference cube and reload it. Loading a reference cube retrieves reference cube values, placing them in target memory.
You can display information about active reference cubes on the target or about reference cubes registered on a particular source.
To manage reference cubes, use MaxL statements (details in the Oracle Essbase Technical Reference).
|Create a reference cube||create passive|active reference_cube|
|Delete a reference cube||drop reference_cube|
|Load or unload a reference cube||alter database|
|List active reference cube information||display reference_cube|
|List information about registered reference cubes||display reference_cube_reg|
If a database works with many reference cube registrations, calculation time may be improved by using MaxL alter database to increase the implicit commit row or block settings.
Individual reference cubes are the size of the source database. Because databases can grow, when you create a reference cube you must specify a maximum size. Databases can have multiple reference cubes. The REFERENCECUBESIZELIMIT configuration setting uses the following syntax to specify the maximum memory to be set aside for all the reference cubes loaded at the same time for a specific database:
REFERENCECUBESIZELIMIT TargetApp TargetDB “max_cell_k_count_size”
REFERENCECUBESIZELIMIT Sample.Basic 100
All sizes are specified in terms of 1000 cells. To calculate the number of cells for a database, you must know the number of cells in an expanded block (including stored and dynamic members) and the number of potential blocks. The number of cells in an expanded block is the product of the number of members across the dense dimensions. Multiply this product by the potential number of blocks (shown on the Database Statistics tab of the Database Properties window in Administration Services Console). For a database with multiple reference cubes, sum the cell counts of its reference cubes. Divide the cell count by 1000 for the number to be used in the REFERENCECUBESIZELIMIT configuration setting and the create passive|active reference cube MaxL statement. The default size for REFERENCECUBESIZELIMIT is 8 (8000 cells).
During operations, when the sum of the cell-count sizes of multiple reference cubes reaches the maximum set by the configuration setting, no more reference cubes are loaded.
Table 120 shows how Essbase calculates #MISSING values. In this table, X represents any number:
Table 120. How Essbase Treats #MISSING Values
X + #MISSING
X – #MISSING #MISSING – X
X * #MISSING
X / #MISSING #MISSING / X X / 0
#MISSING #MISSING #MISSING
X % #MISSING #MISSING % X X % 0
#MISSING #MISSING #MISSING
X == #MISSING
FALSE, unless X is #MISSING
X != #MISSING X < > #MISSING
TRUE, unless X is #MISSING TRUE, unless X is #MISSING
X <= #MISSING
(X <= 0)
X >= #MISSING
(X >= 0) or (X == #MISSING)
X > #MISSING
(X > 0)
X < #MISSING
(X < 0)
X AND #MISSING: Y AND #MISSING, where Y represents any nonzero value 0 AND #MISSING #MISSING AND #MISSING
#MISSING 0 #MISSING
X OR #MISSING: Y OR #MISSING, where Y represents any nonzero value 0 OR #MISSING #MISSING OR #MISSING
Y #MISSING #MISSING
#MISSING for any Essbase function of one variable
#MISSING for any X not in the domain of f and any Essbase function of more than one variable (except where specifically noted)
By default, Essbase does not roll up #MISSING values. However, if you always load data at level 0 and never at parent levels, you should enable the setting for consolidating #MISSING values. This setting provides a calculation performance improvement of 1%–30%. The performance improvement varies, depending on database size and configuration.
The default, not consolidating #MISSING values, must be in effect if you load data at parent, rather than child, levels, if any child member combinations have #MISSING values. If all child member combinations have any other values, including zero (0), Essbase rolls up the child values and overwrites the parent values correctly, so you can safely change the default.
To consolidate, enable the setting for consolidating #MISSING values by using one of the methods described above. The degree of performance improvement you achieve depends on the ratio between upper-level blocks and input blocks in the database.
To change how Essbase consolidates #MISSING values, use a tool:
If you enable the setting for consolidating #MISSING values, the cell calculation order within a data block changes. See Cell Calculation Order.
For a information on how Essbase calculates #MISSING values, see Consolidating #MISSING Values.
Removing empty blocks improves performance when data values already have been loaded. However, data load process time increases if new values require that blocks be created.
When you convert currencies using the CCONV command, the resulting data blocks are marked as dirty for the purposes of Intelligent Calculation. This means that Essbase recalculates all the converted blocks when you recalculate the database. See Understanding Intelligent Calculation.