Dear all,
I have got a problem when copying one dimension to another.
TM1 Version 10.2.1.
In the Prolog, I define the Datasource:
sSub = 'z_akt_';
sDim = psQuellDim;
smdx = '{TM1SUBSETALL( [' | psQuellDim | '] )}';
subsetdestroy(sDim, sSub);
subsetcreatebymdx( sSub, smdx);
DatasourceNameForServer = psQuellDim;
DatasourceDimensionSubset = sSub;
The Source-Dimension has about 30.000 Elements.
With this datasource, the Meta-Part is through (here I insert all elements from the sourcedim) in about 1 Second.
In Data, I want to copy the attributes with the following code:
anzAttr=DIMSIZ('}ElementAttributes_'| psQuelldim);
While(anzAttr>0);
Attributname=DIMNM('}ElementAttributes_'| psQuelldim,anzAttr);
AttrType=DTYPE('}ElementAttributes_'| psQuelldim,Attributname);
IF(AttrType@='AA' % AttrType@='AS');
AttrInhaltS=ATTRS(psQuellDim, vsElem,Attributname);
IF(DIMIX(psZielDim, vsElem) >0);
ATTRPUTS(AttrInhaltS, psZielDim, vsElem,Attributname);
ENDIF;
ENDIF;
anzAttr=AnzAttr-1;
END;
This takes sevaral Minutes!
If I remove the dynamic datasource (marked bold above) and take the subset "All" as datasource, Copying the attributes in Data is as fast copying the elements in Meta.
Does anyone have a idea, why?
Regards
Mark
TI: Dynamic Subset as Datasource
-
- MVP
- Posts: 1828
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: TI: Dynamic Subset as Datasource
Dynamic subsets for TI processes being slow is discussed extensively if you search the forum.
Just remove the last element from the subset and then add it back on straight after your subsetcreatebymdx in the prolog. You then get the exact same subset of elements to work with but it is now static, your process will then be much quicker.
Just remove the last element from the subset and then add it back on straight after your subsetcreatebymdx in the prolog. You then get the exact same subset of elements to work with but it is now static, your process will then be much quicker.
Declan Rodger
-
- Posts: 64
- Joined: Fri Jul 27, 2012 4:13 pm
- OLAP Product: TM1
- Version: 2010
- Excel Version: Excel 2010
Re: TI: Dynamic Subset as Datasource
That sounds interesting , I would alwasy avoid using dynamic subset as data source to minimize locking issue , but I haven't realized it would actuall has a performance impact . To extend this topic , I am very curious to know if you have experienced any slow peroformance when using a view as datasource where it 's using dynamic subsets ?declanr wrote:Dynamic subsets for TI processes being slow is discussed extensively if you search the forum.
Just remove the last element from the subset and then add it back on straight after your subsetcreatebymdx in the prolog. You then get the exact same subset of elements to work with but it is now static, your process will then be much quicker.
Cheers
-
- MVP
- Posts: 3230
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: TI: Dynamic Subset as Datasource
Hello
To be honest, I never experienced slower performance due to dynamic subsets as being the source of a process, compared to static subsets.
Maybe I can test some cases if anyone has a scenario where it's evident, so that I can reproduce it?
To be honest, I never experienced slower performance due to dynamic subsets as being the source of a process, compared to static subsets.
Maybe I can test some cases if anyone has a scenario where it's evident, so that I can reproduce it?
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 1828
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: TI: Dynamic Subset as Datasource
To be honest I was mostly referring to my experience with cube views as sources; when I need a subset as a source I tend to just do while loops through it and avoid using the Metadata/Data tabs (no specific reason, just habit.)hyunjia wrote:That sounds interesting , I would alwasy avoid using dynamic subset as data source to minimize locking issue , but I haven't realized it would actuall has a performance impact . To extend this topic , I am very curious to know if you have experienced any slow peroformance when using a view as datasource where it 's using dynamic subsets ?declanr wrote:Dynamic subsets for TI processes being slow is discussed extensively if you search the forum.
Just remove the last element from the subset and then add it back on straight after your subsetcreatebymdx in the prolog. You then get the exact same subset of elements to work with but it is now static, your process will then be much quicker.
Cheers
It can largely be dependent on what you do but changes to data can cause the Dynamic Subset to be re-evaluated, causing the performance hit.
Declan Rodger
-
- MVP
- Posts: 3702
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: TI: Dynamic Subset as Datasource
Wim your experience <> my experience. I think at some point I even built a test case model and it is posted here in some thread somewhere showing that processing with a dynamic subset as the source is orders of magnitude slower than a static source if any action on the metadata or data tabs should cause the subset to be reevaluated.Wim Gielis wrote:Hello
To be honest, I never experienced slower performance due to dynamic subsets as being the source of a process, compared to static subsets.
Maybe I can test some cases if anyone has a scenario where it's evident, so that I can reproduce it?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- MVP
- Posts: 3230
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: TI: Dynamic Subset as Datasource
Hi Lotsaram
With my statement, I was referring to the typical data-integration processes (sending data from 1 cube to the same cube or a different one).
I did not think about processes that update the dimension in their Metadata tab, for example. In that case, you're right.
Making the dimension static (an MDX statement with the correct elements plus the DFRST of the dimension, which is then eliminated to make it static) is preferable.
Both the power and condensed notation of MDX, and avoiding slowness like you wrote down correctly.
With my statement, I was referring to the typical data-integration processes (sending data from 1 cube to the same cube or a different one).
I did not think about processes that update the dimension in their Metadata tab, for example. In that case, you're right.
Making the dimension static (an MDX statement with the correct elements plus the DFRST of the dimension, which is then eliminated to make it static) is preferable.
Both the power and condensed notation of MDX, and avoiding slowness like you wrote down correctly.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 64
- Joined: Fri Jul 27, 2012 4:13 pm
- OLAP Product: TM1
- Version: 2010
- Excel Version: Excel 2010
Re: TI: Dynamic Subset as Datasource
Good point . In that case , dynamic subset should be avoided defitnitly .
lotsaram wrote:Wim your experience <> my experience. I think at some point I even built a test case model and it is posted here in some thread somewhere showing that processing with a dynamic subset as the source is orders of magnitude slower than a static source if any action on the metadata or data tabs should cause the subset to be reevaluated.Wim Gielis wrote:Hello
To be honest, I never experienced slower performance due to dynamic subsets as being the source of a process, compared to static subsets.
Maybe I can test some cases if anyone has a scenario where it's evident, so that I can reproduce it?