Just read Steve Rowe's post regarding speed of TI in Dimension Creation, and did not want to hijack it, although it may be related.
I have recently noticed a major performance issue using the DimensionElementComponentDelete function in a TI in 10.1 (CE)
I have a dimension consisting of around 2.5m elements. It only has one root (Level 1) with the remainder its children i.e.:
Top Consol
--Element 1
--Element ....
--Element 2500000
Dependant on an Attribute I had to re order the dimension and place each element under one of three new consolidations so it would now look like the following:
Top Consol
--Bucket 1
----Element 1
----Element ....
--Bucket 2
----Element 6
----Element ....
--Bucket 3
----Element 8
----Element ....
So My original TI had the attribute cube view as the Source, and nothing in any of the tabs except the following in the metadata:
Code: Select all
IF(vValue @='M');
strParent = 'Mixed Orders';
ELSEIF(vValue @='I');
strParent = 'Internal Orders';
ELSEIF(vValue @='E');
strParent = 'External Orders';
ELSE;
strParent = 'Unallocated Orders';
ENDIF;
strDimtoCheck = 'Sales_Document_Nos_Dim';
strTopConsol = 'Total Sales Documents Nos';
IF (ELLEV(strDimtoCheck, vSalesNum) = 0);
IF (DIMIX(strDimtoCheck, strParent) = 0);
DimensionElementComponentAdd(strDimtoCheck, strTopConsol,strParent, 1);
ENDIF;
IF(ELPAR(strDimtoCheck, vSalesNum,1) @<> strParent);
DimensionElementComponentDelete(strDimtoCheck, ELPAR(strDimtoCheck, vSalesNum,1) ,vSalesNum);
DimensionElementComponentAdd(strDimtoCheck, strParent ,vSalesNum, 1);
ENDIF;
ENDIF;
As soon as I removed the DimensionElementComponentDelete Line it sped through the records in 90 seconds. Thats 2.5M Elements added underneath a new consolidation.
I then created another TI with the same datasource with just 3 lines in the metadata to ensure all elements just have the new Parent:
Code: Select all
strDimtoCheck = 'Sales_Document_Nos_Dim';
strTopConsol = 'Total Sales Documents Nos';
DimensionElementComponentDelete(strDimtoCheck, strTopConsol ,vSalesNum);
I have also tried the new function with the DIRECT postfix, and its the same issue.
Would like to hear any ideas how I could change/fix this so that I can efficiently move Elements without worrying if they roll up twice anywhere, or is this a potential Bug?