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)

