|NO.Z.00020|——————————|BigDataEnd|——|Hadoop&OLAP_Kylin.V20|——|Kylin.v20|Cube优化|使用衍生维度.V3|

一、案例二:定义衍生维度及对比:
### --- 定义cube

~~~     构建与前面Cube4类似的Cube7,仅在维度定义有区别,以下是二者的对比:
二、定义cube
### --- 定义cube

~~~     # 1、定义一个cube:基于yanqi_sales_model4定义cube7
~~~     # 2、定义维度
~~~     # 3、定义度量值
~~~     # 4、刷新设置:默认
~~~     # 5、高级设置:默认
~~~     # 6、配置覆盖:默认
~~~     # 7、概述:默认——>Save

三、执行构建cube
### --- 执行构建cube

~~~     执行构建cube
四、执行sql查询
### --- 执行sql查询

~~~     # 1、在yanqi_sales_cube4查询
~~~     # 2、在yanqi_sales_cube7查询

五、查看cube4和cube size大小
### --- 查看cube4和cube size大小

~~~     # 1、定义的cube4的维表值:使用了衍生维度
~~~     # 2、定义的cube7的维表值:不使用衍生维度
~~~     # 3、cube4 size/cube7 size大小对比

六、Cube大小精度
### --- 查看Cube大小进度:yanqi_sales_cube4

~~~     # 查看Cube大小精度:yanqi_sales_cube4
[root@hadoop02 ~]# kylin.sh org.apache.kylin.engine.mr.common.CubeStatsReader yanqi_sales_cube4
 ~~~输出参数:没有进行merge,会输出4条参数
 ============================================================================
Statistics of yanqi_sales_cube4[20211001000000_20211002000000]

Cube statistics hll precision: 14
Total cuboids: 15
Total estimated rows: 101
Total estimated size(MB): 0.0013644695281982422
Sampling percentage:  100
Mapper overlap ratio: 1.0
Mapper number: 1
Length of dimension YANQI_KYLIN.DW_SALES1.DT is 1
Length of dimension YANQI_KYLIN.DW_SALES1.PRODUCTID is 1
Length of dimension YANQI_KYLIN.DW_SALES1.CHANNELID is 1
Length of dimension YANQI_KYLIN.DW_SALES1.REGIONID is 1
|---- Cuboid 1111, est row: 18, est MB: 0
    |---- Cuboid 0111, est row: 18, est MB: 0, shrink: 100%
        |---- Cuboid 0011, est row: 6, est MB: 0, shrink: 33.33%
            |---- Cuboid 0001, est row: 2, est MB: 0, shrink: 33.33%
            |---- Cuboid 0010, est row: 3, est MB: 0, shrink: 50%
        |---- Cuboid 0101, est row: 8, est MB: 0, shrink: 44.44%
            |---- Cuboid 0100, est row: 4, est MB: 0, shrink: 50%
        |---- Cuboid 0110, est row: 9, est MB: 0, shrink: 50%
    |---- Cuboid 1011, est row: 6, est MB: 0, shrink: 33.33%
        |---- Cuboid 1001, est row: 2, est MB: 0, shrink: 33.33%
            |---- Cuboid 1000, est row: 1, est MB: 0, shrink: 50%
        |---- Cuboid 1010, est row: 3, est MB: 0, shrink: 50%
    |---- Cuboid 1101, est row: 8, est MB: 0, shrink: 44.44%
        |---- Cuboid 1100, est row: 4, est MB: 0, shrink: 50%
    |---- Cuboid 1110, est row: 9, est MB: 0, shrink: 50%
----------------------------------------------------------------------------
### --- 查看Cube大小精度:yanqi_sales_cube7

~~~     # 查看Cube大小精度:yanqi_sales_cube7
[root@hadoop02 ~]# kylin.sh org.apache.kylin.engine.mr.common.CubeStatsReader yanqi_sales_cube7
 ~~~输出参数:没有进行merge,会输出4条参数
 ============================================================================
Statistics of yanqi_sales_cube7[20211001000000_20211002000000]

Cube statistics hll precision: 14
Total cuboids: 127
Total estimated rows: 1777
Total estimated size(MB): 0.02460932731628418
Sampling percentage:  100
Mapper overlap ratio: 1.0
Mapper number: 1
Length of dimension YANQI_KYLIN.DW_SALES1.DT is 1
Length of dimension YANQI_KYLIN.DIM_PRODUCT.PRODUCTID is 1
Length of dimension YANQI_KYLIN.DIM_PRODUCT.PRODUCTNAME is 1
Length of dimension YANQI_KYLIN.DIM_CHANNEL.CHANNELID is 1
Length of dimension YANQI_KYLIN.DIM_CHANNEL.CHANNELNAME is 1
Length of dimension YANQI_KYLIN.DIM_REGION.REGIONID is 1
Length of dimension YANQI_KYLIN.DIM_REGION.REGIONNAME is 1
|---- Cuboid 1111111, est row: 24, est MB: 0
    |---- Cuboid 0111111, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 0011111, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0001111, est row: 6, est MB: 0, shrink: 25%
                |---- Cuboid 0000111, est row: 6, est MB: 0, shrink: 100%
                    |---- Cuboid 0000011, est row: 2, est MB: 0, shrink: 33.33%
                        |---- Cuboid 0000001, est row: 2, est MB: 0, shrink: 100%
                        |---- Cuboid 0000010, est row: 2, est MB: 0, shrink: 100%
                    |---- Cuboid 0000101, est row: 6, est MB: 0, shrink: 100%
                        |---- Cuboid 0000100, est row: 3, est MB: 0, shrink: 50%
                    |---- Cuboid 0000110, est row: 6, est MB: 0, shrink: 100%
                |---- Cuboid 0001011, est row: 6, est MB: 0, shrink: 100%
                    |---- Cuboid 0001001, est row: 6, est MB: 0, shrink: 100%
                        |---- Cuboid 0001000, est row: 3, est MB: 0, shrink: 50%
                    |---- Cuboid 0001010, est row: 6, est MB: 0, shrink: 100%
                |---- Cuboid 0001101, est row: 6, est MB: 0, shrink: 100%
                    |---- Cuboid 0001100, est row: 3, est MB: 0, shrink: 50%
                |---- Cuboid 0001110, est row: 6, est MB: 0, shrink: 100%
            |---- Cuboid 0010111, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0010011, est row: 8, est MB: 0, shrink: 33.33%
                    |---- Cuboid 0010001, est row: 8, est MB: 0, shrink: 100%
                        |---- Cuboid 0010000, est row: 4, est MB: 0, shrink: 50%
                    |---- Cuboid 0010010, est row: 8, est MB: 0, shrink: 100%
                |---- Cuboid 0010101, est row: 24, est MB: 0, shrink: 100%
                    |---- Cuboid 0010100, est row: 12, est MB: 0, shrink: 50%
                |---- Cuboid 0010110, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0011011, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0011001, est row: 24, est MB: 0, shrink: 100%
                    |---- Cuboid 0011000, est row: 12, est MB: 0, shrink: 50%
                |---- Cuboid 0011010, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0011101, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0011100, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 0011110, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 0101111, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0100111, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0100011, est row: 8, est MB: 0, shrink: 33.33%
                    |---- Cuboid 0100001, est row: 8, est MB: 0, shrink: 100%
                        |---- Cuboid 0100000, est row: 4, est MB: 0, shrink: 50%
                    |---- Cuboid 0100010, est row: 8, est MB: 0, shrink: 100%
                |---- Cuboid 0100101, est row: 24, est MB: 0, shrink: 100%
                    |---- Cuboid 0100100, est row: 12, est MB: 0, shrink: 50%
                |---- Cuboid 0100110, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0101011, est row: 18, est MB: 0, shrink: 75%
                |---- Cuboid 0101001, est row: 18, est MB: 0, shrink: 100%
                    |---- Cuboid 0101000, est row: 9, est MB: 0, shrink: 50%
                |---- Cuboid 0101010, est row: 18, est MB: 0, shrink: 100%
            |---- Cuboid 0101101, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0101100, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 0101110, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 0110111, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0110011, est row: 8, est MB: 0, shrink: 33.33%
                |---- Cuboid 0110001, est row: 8, est MB: 0, shrink: 100%
                    |---- Cuboid 0110000, est row: 4, est MB: 0, shrink: 50%
                |---- Cuboid 0110010, est row: 8, est MB: 0, shrink: 100%
            |---- Cuboid 0110101, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0110100, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 0110110, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 0111011, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0111001, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 0111000, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 0111010, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 0111101, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 0111100, est row: 12, est MB: 0, shrink: 50%
        |---- Cuboid 0111110, est row: 24, est MB: 0, shrink: 100%
    |---- Cuboid 1011111, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1001111, est row: 6, est MB: 0, shrink: 25%
            |---- Cuboid 1000111, est row: 6, est MB: 0, shrink: 100%
                |---- Cuboid 1000011, est row: 2, est MB: 0, shrink: 33.33%
                    |---- Cuboid 1000001, est row: 2, est MB: 0, shrink: 100%
                        |---- Cuboid 1000000, est row: 1, est MB: 0, shrink: 50%
                    |---- Cuboid 1000010, est row: 2, est MB: 0, shrink: 100%
                |---- Cuboid 1000101, est row: 6, est MB: 0, shrink: 100%
                    |---- Cuboid 1000100, est row: 3, est MB: 0, shrink: 50%
                |---- Cuboid 1000110, est row: 6, est MB: 0, shrink: 100%
            |---- Cuboid 1001011, est row: 6, est MB: 0, shrink: 100%
                |---- Cuboid 1001001, est row: 6, est MB: 0, shrink: 100%
                    |---- Cuboid 1001000, est row: 3, est MB: 0, shrink: 50%
                |---- Cuboid 1001010, est row: 6, est MB: 0, shrink: 100%
            |---- Cuboid 1001101, est row: 6, est MB: 0, shrink: 100%
                |---- Cuboid 1001100, est row: 3, est MB: 0, shrink: 50%
            |---- Cuboid 1001110, est row: 6, est MB: 0, shrink: 100%
        |---- Cuboid 1010111, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1010011, est row: 8, est MB: 0, shrink: 33.33%
                |---- Cuboid 1010001, est row: 8, est MB: 0, shrink: 100%
                    |---- Cuboid 1010000, est row: 4, est MB: 0, shrink: 50%
                |---- Cuboid 1010010, est row: 8, est MB: 0, shrink: 100%
            |---- Cuboid 1010101, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 1010100, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 1010110, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1011011, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1011001, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 1011000, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 1011010, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1011101, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1011100, est row: 12, est MB: 0, shrink: 50%
        |---- Cuboid 1011110, est row: 24, est MB: 0, shrink: 100%
    |---- Cuboid 1101111, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1100111, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1100011, est row: 8, est MB: 0, shrink: 33.33%
                |---- Cuboid 1100001, est row: 8, est MB: 0, shrink: 100%
                    |---- Cuboid 1100000, est row: 4, est MB: 0, shrink: 50%
                |---- Cuboid 1100010, est row: 8, est MB: 0, shri2021-11-20 19:30:26,268 INFO  [main] dict.DictionaryManager:437 : Loading dictionary at /dict/YANQI_KYLIN.DW_SALES1/DT/8a7cde1f-36f4-2677-e4dc-aad5a446ef0e.dictnk: 100%
            |---- Cuboid 1100101, est row: 24, est MB: 0, shrink: 100%
                |---- Cuboid 1100100, est row: 12, est MB: 0, shrink: 50%
            |---- Cuboid 1100110, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1101011, est row: 18, est MB: 0, shrink: 75%
            |---- Cuboid 1101001, est row: 18, est MB: 0, shrink: 100%
                |---- Cuboid 1101000, est row: 9, est MB: 0, shrink: 50%
            |---- Cuboid 1101010, est row: 18, est MB: 0, shrink: 100%
        |---- Cuboid 1101101, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1101100, est row: 12, est MB: 0, shrink: 50%
        |---- Cuboid 1101110, est row: 24, est MB: 0, shrink: 100%
    |---- Cuboid 1110111, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1110011, est row: 8, est MB: 0, shrink: 33.33%
            |---- Cuboid 1110001, est row: 8, est MB: 0, shrink: 100%
                |---- Cuboid 1110000, est row: 4, est MB: 0, shrink: 50%
            |---- Cuboid 1110010, est row: 8, est MB: 0, shrink: 100%
        |---- Cuboid 1110101, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1110100, est row: 12, est MB: 0, shrink: 50%
        |---- Cuboid 1110110, est row: 24, est MB: 0, shrink: 100%
    |---- Cuboid 1111011, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1111001, est row: 24, est MB: 0, shrink: 100%
            |---- Cuboid 1111000, est row: 12, est MB: 0, shrink: 50%
        |---- Cuboid 1111010, est row: 24, est MB: 0, shrink: 100%
    |---- Cuboid 1111101, est row: 24, est MB: 0, shrink: 100%
        |---- Cuboid 1111100, est row: 12, est MB: 0, shrink: 50%
    |---- Cuboid 1111110, est row: 24, est MB: 0, shrink: 100%
----------------------------------------------------------------------------

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

posted on   yanqi_vip  阅读(32)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示