Microstrategy Performance Tuning

We have different options to make MSTR to write a better query and again it is depends on your business logic.

Here I am giving few useful and handy options which improves MSTR query and its performance.

Few VLDB settings which are helpful to write better query with respect to different scenarios:

  1. Select/Insert --> Attribute Form Selection --> change to select ID and other forms -this might prevent some of the lookup table joins if all information are already in the temp tables. Might not work if you have outer join settings in final pass 
  2. Select/Insert --> Attribute Selection Option --> change to select other attributes in join tree - this might again diminish the amount of joins in the final pass
  3. Query Optimization --> Additional Final Pass --> change to have one additional pass for lkp tables only - this might split your final join and make it easier for SQL server
  4. Lookup Table Join Order --> change to "Fully ..." - this might change the order to something more suitable
Another factor which is really important in terms of performance is query execution plan. Some cases, MSTR query would be good but still query performance is very bad due to query execution plan.

In this case, you have analyze the execution plan carefully and have to tweak using below options

1) Adjust any of the above VLDB settings as per the analysis
2) If necessary, use some SQL hint and we have VLDB options to implement that.

Example:
------------ 
In one scenario, MSTR SQL is perfectly alright and still your last pass query is taking huge time.

We have done a different analysis like, 

  1. Change SQL join type to SQL 89 - This gives very good performance
  2. Changed Join order in the final pass, again it works

Then we took our SQL execution plan and analyzed then we came to know, with some cost or stats, execution plan is taking wrong join order and it leads to number of cross joins in the background.

Then we used a SQL hint to force the join order - Option (force order) and query ran in seconds.

Comments

Post a Comment

Popular posts from this blog

Intelligent cubes in Microstrategy

Useful Metadata Queries - Microstrategy

Microstrategy OLAP - Dynamic Aggregation