MDX: how to find poorly performing measures

  • I have an MDX query with 220 measures (don't ask) that is performing poorly and I'd like to find an approach to discover which measures are eating up all the time. I'd like to find a way to isolate each measure in the MDX and track how long it takes to run. In T-SQL, I'd probably use sp_ExecuteSQL with variables that I just WHILE through the values for the variable.

    I had been doing something similar with OPENROWSET() with a string inside representing the MDX and substituting individual measures and record the Start and End times for each result, but wanted to check with you folks whether I'm working too hard to make this happen.

    TIA

  • As I don;t know SSAS at any level of detail, I'm not aware of how one does that, but from a practical perspective, unless there is some unknown performance degradation caused by merely using OPENROWSET to run your MDX query, that's probably not "working too hard", and if you want to actually make it easier, you could use variables to  record the start and end time, the measure names into a temp table, and CURSOR your way through to save you the trouble of having to type and maybe make mistakes a lot.   One good list of measures dumped into a temp table would be rather handy to avoid the editing, and automate the process...   In other words, I'd be willing to work a little harder than you already have just to avoid the repetitive nature of that kind of work.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply