Dimensions ordered for least memory overhead?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Dimensions ordered for least memory overhead?

    Hi all

    I recently took a look at the Palo server's code in order to try to understand how it works internally. It seems to me that it keeps a hierarchy of lists, one hierarchy level per dimension. Like with the facts

    Source Code

    1. [ {[2003, ch, desktop], 100.0}
    2. , {[2003, ch, notebook], 200.0}
    3. , {[2003, fr, desktop], 8000.0}
    4. , {[2004, fr, desktop], 4000.0}
    5. , {[2004, fr, notebook], 9000.0}
    6. ]


    it would look like

    Source Code

    1. [ {2003
    2. , [ {ch
    3. , [ {desktop, 100.000}
    4. , {notebook, 200.000}
    5. ]
    6. }
    7. , {fr
    8. , [ {desktop, 8000.00}
    9. ]
    10. }
    11. ]
    12. }
    13. , {2004
    14. , [ {fr
    15. , [ {desktop, 4000.00}
    16. , {notebook, 9000.00}
    17. ]
    18. }
    19. ]
    20. }
    21. ]
    Display All


    From this I conclude that the overhead of this structure is smallest (for a fully populated cube) if the dimensions are sorted in ascending order by cardinality. So my question: does Palo do this? From what I understood of the code, it seems to me it does not. And if it really doesn't, was this a conscious design decision? (It does have an effect on aggregation speed depending on what the most typical aggregation paths are.)

    Regards,
    -peo