we just released a new helpful utility powered by TM1py: OptimusPy
https://code.cubewise.com/optimuspy

It optimizes the dimension order for any cube in your TM1 model in a fully transparent and comprehensible approach.
Essentially it takes the guesswork out of the dimension reordering.
The algorithm to determine the right order is based on the theory that the higher positions in the dimension order drive the memory footprint of the cube, while the lower positions are a driver for the query speed.
Essentially what Optimus does is this: For a cube with n dimensions
- Try all dimensions at position n. Fixate the dimension that causes the lowest memory footprint.
- Try all left dimensions (= n-1) at position 0. Fixate the dimension that causes the best query speed.
- Try all left dimensions (= n-2) at position n - 1. Fixate the dimension that causes the best query speed.
- Try all left dimensions (= n-3) at position 1. Fixate the dimension that causes the best query speed.
- ...
Based on the results of this iterative approach, Optimus produces a CSV and a scatterplot. A sample is attached below.
Optimus will always try to strike a balance between RAM and query speed. In certain cases, the user may favor one over the other. Based on the CSV and the plot an alternative order can be found.
OptimusPy is free and open-source.
It's built with TM1py and uses matplotlib to create the plots.
Please feel free to contribute code or ideas if you have improvements or suggestions in mind.
https://github.com/cubewise-code/optimus-py

The plot compares the original order with all iterations (= evaluated dimension orders) and the ideal order