Slow MDX subset creation in a TI
Posted: Fri Mar 12, 2021 7:22 pm
Ran into this within the past week on a TI that has pretty much been running flawlessly for months.
Processing time went from <4 seconds to over 30 minutes. Yep, a wee bit drastic there. So started digging and here are the results:
The offending code. This takes over 30 minutes to execute:
The P Accounts subset is also an MDX query and here is its code:
I did not write this code and always use the ALL argument in my UNION mdx. Tried that with no discernible improvement.
But if I import the subset's MDX code instead of using TM1SUBSETTOSET:
Back to just a few seconds in execution time. I do not use TM1SUBSETTOSET much, but have never really noticed any issues with it. To expand on the oddity, is the offending MDX with TM1SUBSETTOSET executes instantly in ARC's MDX tool & Architect.
This seems like a bug to me. Anyone know or have an idea about what this is about? @Wim? Thought I'd post it in case someone has a TI that seems to be more like Slow Poke Rodriguez instead of Speedy Gonzales.
https://www.youtube.com/watch?v=wYi_hq2p1Ac
Processing time went from <4 seconds to over 30 minutes. Yep, a wee bit drastic there. So started digging and here are the results:
The offending code. This takes over 30 minutes to execute:
Code: Select all
subAccountsMaster = 'tmp_Test Subset';
# sMDX = 'UNION( {[Accounts Master].CurrentMember}, TM1SUBSETTOSET( [Accounts Master], "P Accounts"))';
SubsetCreateByMDX(subAccountsMaster, sMDX, 1);
# the SubsetCreateByMDX takes 30 minutes. The SubsetElementDelete performs in a split second.
SubsetElementDelete('Accounts Master', subAccountsMaster, 1);
Code: Select all
# [Version].[Default] is also a perm MDX subset
FILTER(TM1SUBSETALL( [Accounts Master] ),
[lookup.FPRP].(TM1Member([Version].[Default].Item(0), 0), [sys.Websheet Control].[Effective], [lookup.Measure].[Account Type]) = 'P')
But if I import the subset's MDX code instead of using TM1SUBSETTOSET:
Code: Select all
subAccountsMaster = 'tmp_Test Subset';
sMDX = 'UNION( {[Accounts Master].CurrentMember}, FILTER(TM1SUBSETALL( [Accounts Master] ),
[lookup.FPRP].(TM1Member([Version].[Default].Item(0), 0), [sys.Websheet Control].[Effective], [lookup.Measure].[Account Type]) = ''P''))';
SubsetCreateByMDX(subAccountsMaster, sMDX, 1);
SubsetElementDelete('Accounts Master', subAccountsMaster, 1);
This seems like a bug to me. Anyone know or have an idea about what this is about? @Wim? Thought I'd post it in case someone has a TI that seems to be more like Slow Poke Rodriguez instead of Speedy Gonzales.
https://www.youtube.com/watch?v=wYi_hq2p1Ac