Version (25 elements)
Scenario (1, it is a placeholder for future functionality)
Pool Source (27)
Account Source (132,668)
Account Target (5,269)
Pool Target (28)
Measure (3)
The Measure dimension's elements are. AllocationSourceFlag (0/1), AllocationTargetFlag (0/1) and Parent (Total Cost/Total Base). There are no rules or feeders for this cube. The dimension is populated entirely by a TI process, with the source data coming from Oracle with each record containing Pool Source, Account Source, Account Target, Pool Target, Parent. The Pool and Account dimensions all have top level consolidation element (Total Pools, Total Accounts). For each record read in, the intersection in the cube has AllocationSourceFlag set to 1. If the record is a target, then AllocationTargetFlag is set to 1. An intersection can be both a source and a target. Example: Pool 001 allocates to Pool 002, which in turn allocates to Pool 009.
The source SQL statement returns about 150,000 records. The data section of the TI runs rapidly until it hits about 25,000 records, generally a few seconds. Then it takes over three minutes to process the other 125,000 records. We have isolated the culprit line and it seems this may be a teaching moment to learn why we have this issue. First, the code:
Code: Select all
CELLPUTN(1, cubTarget, strVersion, strScenarioDefault, vSourcePool, strAcctOrgSourceMaster, strAcctOrgTarget, strTargetPool, 'AllocationSourceFlag');
CELLPUTS(strParentConsolidation, cubTarget, strVersion, strScenarioDefault, vSourcePool, strAcctOrgSourceMaster, strAcctOrgTarget, strTargetPool, 'Parent');
CELLPUTS(strParentConsolidation, cubTarget, strVersion, strScenarioDefault, vSourcePool, strAcctOrgSourceMaster, 'Total', 'Total Pools', 'Parent');
# If an allocation target, then populate the Allocation Target element.
# check by getting the value of the Total Source Pool, Total Source AcctOrg for a given target AcctOrg and Target Pool of Allocation Source
IF (DIMIX(dimAcctOrgTarget, strAcctOrgSourceMaster) > 0);
nIsAllocationTarget = IF(CELLGETN(cubTarget, strVersion, strScenarioDefault, 'Total Pools', strTopLevelAcctOrg, strAcctOrgSourceMaster, vSourcePool, 'AllocationSourceFlag') = 0, 0, 1);
CELLPUTN(nIsAllocationTarget, cubTarget, strVersion, strScenarioDefault, vSourcePool, strAcctOrgSourceMaster, strAcctOrgTarget, strTargetPool, 'Allocation Target');
ELSE;
ASCIIOUTPUT(strDataErrLogFile, 'Source AcctOrg Not in Target DIM', strVersion, vSourcePool, vParentConsolidation, vAcct_ID, vOrg, vAllocationAcct, vTargetPool);
ENDIF;
Record: 200, 501-150-001, No Account, No Pool looks at Total Pools (Source), Total Accounts (Source), 501-150-001, 200 and if the value of AllocationSourceFlag is > 0, then flag as a target (AccountAllocationTarget = 1)
We have isolated the problem to
Code: Select all
nIsAllocationTarget = IF(CELLGETN(cubTarget, strVersion, strScenarioDefault, 'Total Pools', strTopLevelAcctOrg, strAcctOrgSourceMaster, vSourcePool, 'AllocationSourceFlag') = 0, 0, 1);
Code: Select all
nIsAllocationTarget = CELLGETN(cubTarget, strVersion, strScenarioDefault, 'Total Pools', strTopLevelAcctOrg, strAcctOrgSourceMaster, vSourcePool, 'Allocation Source') \
CELLGETN(cubTarget, strVersion, strScenarioDefault, 'Total Pools', strTopLevelAcctOrg, strAcctOrgSourceMaster, vSourcePool, 'Allocation Source');
Do I have a bad design idea here? Is the cube poorly designed?
Ty