Welcome 微信登录

首页 / 数据库 / MySQL / DB2 10.5 BLU列式存储技术初试

2013年IBM DB2 30周岁啦,在此DB2 10.5发布了,其中一个比较抢眼的特性就是BLU加速器,也就是讲列式存储技术开始引入传统数据库中,但目前BLU特性只是支持一些特定的的版本主要是AIX和linux 64位平台的DB2 AESE版本的数据库,所以外界其实能接触的机会并不多,先给大家看看BLU的配置吧。我使用的DB2版本及license信息:db2level -a
DB21085I  This instance or install (instance name, where applicable: "db2deer")
uses "64" bits and DB2 code release "SQL10053" with level identifier
"0604010E".
Informational tokens are "DB2 v10.5.0.3", "s140203", "IP23544", and Fix Pack
"3".
Product is installed at "/opt/IBM/db2/V10.5".
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"最简单的配置列式存储的方式是,使用用户环境变量参数DB2_WORKLOAD,DB2 10.5多了个取值
db2set DB2_WORKLOAD=ANALYTICS设置好后重启实例即可,此时创建DB即可支持列式存储当然还有就是从低版本升级过来或者之前未启用列式存储的,DB也提供了简单的自动配置方法,修改以上参数后重启实例,然后使用自动配置即可:db2 autoconfigure apply db only        Current and Recommended Values for Database Manager Configuration Description                                 Parameter Current Value     Recommended Value
 -------------------------------------------------------------------------------------------------
 Application support layer heap size (4KB) (ASLHEAPSZ) = 15                                   
No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = AUTOMATIC                             
 Enable intra-partition parallelism   (INTRA_PARALLEL) = NO                                   
Maximum query degree of parallelism (MAX_QUERYDEGREE) = 7                                     
 Agent pool size                        (NUM_POOLAGENTS) = AUTOMATIC(100)                       
Initial number of agents in pool     (NUM_INITAGENTS) = 0                                     
 Max requester I/O block size (bytes)       (RQRIOBLK) = 65535                                 
 Sort heap threshold (4KB)                  (SHEAPTHRES) = 0                                     
        Former and Applied Values for Database Configuration Description                                 Parameter Former Value        Applied Value
 -------------------------------------------------------------------------------------------------
 Default application heap (4KB)           (APPLHEAPSZ) = 256               256               
 Catalog cache size (4KB)              (CATALOGCACHE_SZ) = 402               482               
 Changed pages threshold                (CHNGPGS_THRESH) = 80                  80               
Database heap (4KB)                            (DBHEAP) = 6283                6306             
Degree of parallelism                      (DFT_DEGREE) = ANY               ANY               
 Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32                  32               
Default prefetch size (pages)       (DFT_PREFETCH_SZ) = AUTOMATIC         AUTOMATIC         
 Default query optimization class       (DFT_QUERYOPT) = 5                 5                 
 Max storage for lock list (4KB)              (LOCKLIST) = AUTOMATIC         AUTOMATIC         
 Log file size (4KB)                       (LOGFILSIZ) = 1024                1024             
Number of primary log files                (LOGPRIMARY) = 8                 19               
Number of secondary log files             (LOGSECOND) = 11                  13               
Max number of active applications            (MAXAPPLS) = AUTOMATIC         AUTOMATIC         
 Percent. of lock lists per application     (MAXLOCKS) = AUTOMATIC         AUTOMATIC         
 Number of asynchronous page cleaners (NUM_IOCLEANERS) = 14                  1                 
 Number of I/O servers                 (NUM_IOSERVERS) = 32                  6                 
 Package cache size (4KB)                 (PCKCACHESZ) = AUTOMATIC         AUTOMATIC         
 Sort list heap (4KB)                       (SORTHEAP) = AUTOMATIC         47808             
 SQL statement heap (4KB)                   (STMTHEAP) = 8192                16384             
 Statistics heap size (4KB)             (STAT_HEAP_SZ) = 4384                4384             
Utilities heap size (4KB)                (UTIL_HEAP_SZ) = AUTOMATIC         AUTOMATIC         
 Self tuning memory                    (SELF_TUNING_MEM) = ON                  ON               
    Automatic runstats                  (AUTO_RUNSTATS) = ON                  ON               
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = AUTOMATIC         956160           
Log buffer size (4KB)                        (LOGBUFSZ) = 2152                2152             
Default table organization              (DFT_TABLE_ORG) = ROW               COLUMN           
Database memory threshold             (DB_MEM_THRESH) = 100               100               
        Former and Applied Values for Bufferpool(s) Description                                 Parameter Former Value        Applied Value
 -------------------------------------------------------------------------------------------------
 IBMDEFAULTBP                            Bufferpool size = -2                  119520           
     Former and Applied Values for System WLM Objects Description                                             Former Value        Applied Value
 -------------------------------------------------------------------------------------------------
 Work Action SYSMAPMANAGEDQUERIES Enabled                = Y                 Y                 
 Work Action Set SYSDEFAULTUSERWAS Enabled             = Y                 Y                 
 Work Class SYSMANAGEDQUERIES Timeroncost                = 1.50000E+05       1.50000E+05       
 Threshold SYSDEFAULTCONCURRENT Enabled                  = N                 Y                 
 Threshold SYSDEFAULTCONCURRENT Maxvalue               = 13                  13               
DB210203I  AUTOCONFIGURE completed successfully. Database manager or database
configuration values may have been changed if you chose to apply changes. The
instance must be restarted before any such applied changes come into effect.
You may also want to rebind your packages after the new configuration
parameters take effect so that the new values will be used.可以看到DFT_TABLE_ORG的值由row修改为column了,也就是以后创建的表默认就是列式存储表了,据测试来看列式存储确实在空间使用和SQL查询效率上提高了很多,不过改特性只能支持单表的,对于分表/DPF/MDC/PureScale环境下的表还是不能支持的,好,现在就说初步了解下,以后会有更多的实际应用案例吧。DB2数据库性能调整和优化(第1、2版) PDF http://www.linuxidc.com/Linux/2013-09/90679.htmDB2数据库性能优化介绍 http://www.linuxidc.com/Linux/2013-09/90678.htm本文永久更新链接地址