Home > other >  KYLIN cube optimization related
KYLIN cube optimization related

Time:09-18

In a recent study of KYlin optimization problem, want to ask a question,

Kylin zhongjian Cube is used when the Mandatory Dimensions, to be Dimensions, such as the dimension A, B, C, D, E I built Dimensions are Mandatory Dimensions for A, B,
To be Dimensions for C, D, E, my SQL query is
1, select C, count (C) the from tableinfo where A=1 AND B=2 group by C
2, the select D, count (D) the from tableinfo where A=1 AND B=2 group by D
2, select E, count (E) the from tableinfo where A=1 AND B=2 group by E

This will hit the corresponding cuboid? Or have a better recommendation? (A, B is usually written in the where condition, not in the back of the group by

CodePudding user response:

Necessary dimensions:
Users can sometimes be very interested in one or several dimensions, all of the queries are present in the group by the dimensions, so the dimensions are known as necessary dimension, only include the dimensions of the Cuboid will be generated (as shown in figure 10), assuming that dimension is necessary A dimension, then generate the Cube, as shown, the dimension number from 16 to nine,



The joint dimensions

Users sometimes do not care about dimension between various combinations of details, such as the user's query statement can appear only group by A, B, C, and there will be no group by A, B or group by C, and so on the detailed dimension combination, this kind of problem is the combination of dimension problem, such as the dimension A, B and C are defined as joint dimensions, Kylin will only build A Cuboid ABC, and Cuboid AB, BC, A Cuboid etc will not be generated, the final Cube results as shown in figure 5, number of Cuboid from 16 to reduce to 4,


So young, modify your definition
  • Related