SQL Server Developer Center >
SQL Server Forums
>
SQL Server Analysis Services
>
SSAS - What happens exaclty when the MDX script is loaded?
SSAS - What happens exaclty when the MDX script is loaded?
- Hi all
can someone tell me what SSAS exactly does when the it loads the MDX script (between the Execute MDX Script Begin and the Execute MDX Script End). Using the profiler we see that after a clear cash these event occur. Are the calculations that are present in the MDX Script actually exectuted? Is it just a loading of the script into cash so that it can be executed faster?
Thanks a lot for your answer.
Regards
Stefan
Answers
- Essentially, it's evaluating the scope statements, anything on the left side of an assignment (not the right side), and non-dynamic named sets. So if it's slow, take a look in those statements.
Calculated measures and anything on the right side of the equals sign of an assignment aren't executed until MDX query time.
http://artisconsulting.com/Blog/GregGalloway- Proposed As Answer byDarren GosbellMVP, ModeratorSaturday, November 07, 2009 8:17 PM
- Marked As Answer byfurmanggMVP, ModeratorMonday, November 09, 2009 10:41 PM
- I described happens during the Execute MDX Script Begin/End events. That happens the first time a user with that set of roles/security connects to the cube after processing or clear cache. And it does the whole MDX script.
When an MDX query is executed, only the calculations that impact that query are evaluated.
http://artisconsulting.com/Blog/GregGalloway- Marked As Answer byStefLausanne Thursday, November 12, 2009 8:42 AM
All Replies
- Essentially, it's evaluating the scope statements, anything on the left side of an assignment (not the right side), and non-dynamic named sets. So if it's slow, take a look in those statements.
Calculated measures and anything on the right side of the equals sign of an assignment aren't executed until MDX query time.
http://artisconsulting.com/Blog/GregGalloway- Proposed As Answer byDarren GosbellMVP, ModeratorSaturday, November 07, 2009 8:17 PM
- Marked As Answer byfurmanggMVP, ModeratorMonday, November 09, 2009 10:41 PM
- Hi thanks a lot for you answer.
This means that the calculations are actually only executed when a query is sent to the server? If a query only hits some of the calculations, the others are not executed?
Thanks for your answer
Regards
Stefan - I described happens during the Execute MDX Script Begin/End events. That happens the first time a user with that set of roles/security connects to the cube after processing or clear cache. And it does the whole MDX script.
When an MDX query is executed, only the calculations that impact that query are evaluated.
http://artisconsulting.com/Blog/GregGalloway- Marked As Answer byStefLausanne Thursday, November 12, 2009 8:42 AM
- Thanks


