Hello there,
after migrating from SSAS 2016 to SSAS 2019 (and to Active Directory Authentication) our multidimensional cube has suffered severe performance problems.
After analyzing a slow query (Excel generated, nothing but a measure on an axis, no dimensions) it seems to me as if the server is not caching the dynamic security mdx results.
In SSAS 2016 it can be seen that the allowed dimension data is loaded once at connection start and after that no calls to the storage engine regarding the allowed data are made.
In SSAS 2019 every (!) query causes many "Query Subcube Verbose" "Cached Data" events, which if I understand correctly means that the result for the allowed dimension data was not cached in SE cache. T
I compared all available settings for the two SSAS-Databases, but could not find any meaningful differences.
The mdx to determine the allowed items uses a measure group filtered by the username and a predefined category.
Example "Query Subcube Verbose" output from the 2019 profiler:
Dimension 0 [CustomDataSecurityType] (11) [CustomDataSecurityType]: A category
Dimension 1 [UserSecurityIsCatchAll] (2) [ID]: 0
Dimension 2 [UserSecurityOlapUser] (33) [User]: <Username>
Dimension 3 [UserSecurityDomainItems] (*) [ID]:*
CacheEntries: 31
CacheHits: 36738
CacheSearches: 36849
CacheEvictions: 0
Example MDX that secures dimension data (allowed members in a role):
Extract(
[A secured dimension].Children *
Generate(
NonEmpty(
[UserSecurityDomainItems].[ID].Children,
(
StrToMember ("[UserSecurityOlapUser].[User].[" + Username + "]"),
[CustomDataSecurityType].[CustomDataSecurityType].&[ a category id],
[UserSecurityIsCatchAll].[ID].&[0],
[Measures].[another measure group Count]
)
),
STRTOSET("{([a related dimension].&["+ [UserSecurityDomainItems].[ID].CurrentMember.Properties("key") +"])}")
), [A secured dimension].[a level] )
Is there anything that has changed in regards to how the SE engine is caching from SSAS 2016 to SSAS 2019?
When accessing the cube with Excel for every action that is done (i.e. opening a dimension combobox, opening the All hierarchy member) the whole Cube script (Mdx after calculate) is executed again (Execute Mdx Script Begin/End).
Addendum:
I have since rebuilt the dynamic security restrictions to use a dotnet assembly with internal caching and database backing. This seems reduces the storage engine requests but still leaves me with the Execute Mdx Script for every query. The profiler states that these have a duration of 0 but still a simply opening a dimension (which is not restricted by dynamic security, and has only two elements) takes more than 2 seconds. And when profiling on SSAS 2016 the "Execute Mdx" are only present once when connecting, every other request does not cause them.
Thank you for your time,
regards,
Kris