BLU 的效率问题

db2licm -l
Product name:                     "DB2 Advanced Enterprise Server Edition"
License type:                     "Terabyte"
Expiry date:                      "Permanent"
Product identifier:               "db2aese"
Version information:              "10.5"
Enforcement policy:               "Soft Stop"



数据库启动后, 列表数据访问很慢 (1分钟), 行表数据访问正常(1秒钟), count 倒是很快。

行表

>># time db2 "select * from richard.CMRM_PROD_DIM_Rfetch first 10 rows only with ur"


  10 record(s) selected.



real    0m0.09s

user    0m0.01s

sys     0m0.00s


列表

>># time db2 "select * from richard.CMRM_PROD_DIM fetch first 10 rows only with ur"


10 record(s) selected.


real    0m50.76s

user    0m0.00s

sys     0m0.01s


行表


>># time db2 "select count(1)  from richard.CMRM_PROD_DIM_R  with ur"


1

-----------

   11075304


  1 record(s) selected.



real    3m34.39s

user    0m0.01s

sys     0m0.01s


列表

>># time db2 "select count(1)  from richard.CMRM_PROD_DIM with ur"


1

-----------

   11075304


  1 record(s) selected.



real    0m0.39s

user    0m0.00s

sys     0m0.00s

参与6

5同行回答

wolfopwolfop其它Why should I tell you?
BLU这种列式存储不适合访问多列的情况。列行转换很消耗资源显示全部
BLU这种列式存储不适合访问多列的情况。列行转换很消耗资源收起
IT其它 · 2015-04-29
浏览750
新数科技新数科技IT顾问北京新数科技有限公司
BLU主要用于分析型系统,对聚合运算有优势,但select *这个操作基本不用于分析型系统:L显示全部
BLU主要用于分析型系统,对聚合运算有优势,但select *这个操作基本不用于分析型系统:L收起
IT咨询服务 · 2015-04-29
浏览683
richard_macyrichard_macy数据库管理员macys
都要读全部的表,FIRST X ROWS ONLY 没什么作用。显示全部
都要读全部的表,FIRST X ROWS ONLY 没什么作用。收起
零售/批发 · 2015-04-24
浏览706
richard_macyrichard_macy数据库管理员macys
fetch first 10 rows only with ur 需要 1 分钟 总 是 有问题。EXPLAIN 很简单Statement:  select *  from richard.CMRM_PROD_DIM  fetch first 10 rows only  with urStatement Isolation Level = Uncommitted ReadIntra-Part...显示全部
fetch first 10 rows only with ur 需要 1 分钟 总 是 有问题。
EXPLAIN 很简单
Statement:

  select *
  from richard.CMRM_PROD_DIM
  fetch first 10 rows only
  with ur

Statement Isolation Level = Uncommitted Read
Intra-Partition Parallelism Degree = 16

Section Code Page = 1208

Estimated Cost = 7.201596
Estimated Cardinality = 10.000000

CDE Subquery
|  Tables Referenced:
|  |  1: RICHARD.CMRM_PROD_DIM  ID = 2,45
|  #Output Columns = 121
Return Data to Application
|  #Columns = 121

End of section


Optimizer Plan:

      Rows
    Operator
      (ID)
      Cost

       10
     RETURN
      ( 1)
     7.2016
       |
       10
      CTQ
      ( 2)
     7.2016
      |
       *
      |
  1.10753e+07
Table:
RICHARD
CMRM_PROD_DIM收起
零售/批发 · 2015-04-01
浏览743
苏州易博创云苏州易博创云CTO苏州易博创云网络科技有限公司
列表的优势是在进行聚合运算场合,所有count(*)的值明显快于行表。select * from 对列表来讲全表扫描的io远远大于行表,重启前只所以快,是因为buffer的原因。显示全部
列表的优势是在进行聚合运算场合,所有count(*)的值明显快于行表。select * from 对列表来讲全表扫描的io远远大于行表,重启前只所以快,是因为buffer的原因。收起
IT咨询服务 · 2015-04-01
浏览716

提问者

richard_macy
数据库管理员macys

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2015-04-01
  • 关注会员:1 人
  • 问题浏览:6494
  • 最近回答:2015-04-29
  • X社区推广