We have implemented dynamic security in our SSAS cube. We are using SQL Server 2012.
There is an employee dimension with the following hierachy (not parent child)
Region
Corporation
Department
Team
Employee
We have a bridge table, with the measure [User Employee Access Count] defined between our user table and the Employee table.
On the Cube Dimension Employee, in the Team hierachy we have the following MDX for allowed set.
NONEMPTY
(
[Employees].[Team].[All].Children,
(
StrToMember("[User].[Username].&["+coalesceempty(customdata(),username)+"]"),
[Measures].[User Employee Access Count]
)
)
This is what I have found to be the default way of implementing dynamic security, and it works.
The problem is that there is long latency when a user first accesses the cube. There are about 40.000 members of the Employee dimension, and the MDX takes about 2-3 seconds to run when I use it in a query, but when a user first logs int, if she has access to most or all employees, the first query hangs for up to 90 seconds, before it is finished.
What the query is is not important, and subsequent queries have no performance hit.
My guess is that SSAS uses the time to build the internal security structure. Like I said qhen I define the above MDX as a set in a MDX query and run it in SSMS, it takes 2-3 seconds to return all rows, even when the user has access to 40.000 dimension members, and this is including the overhead by SSMS to print out all rows.
I have tried to make a combination of security setting. Most users have access to only a small part of the employees, and they have a latency of less hten 30 seconds, which is slow, but just acceptable, so we tried making a group for users with access to many Employees and just make a denied member set, but the administration is cumbersome, and we still experience high latency on first login.
Currently I have set up a job that loops through the users with the highest latency, and the most frequent users, and just perform a simple MDX query against the cube every 30 minutes. This warms up the dynamic security, and minimizes the impact on the user, but occasionally they still have to wait on first login, and ideally I would like to do away with the first query latency.
Does anyone have experience with dynamic security in environments with large dimensions, and a large number of report users?