DB2 10.5 BLU列式存儲技術初試

2013年IBM DB2 30週歲啦,在此DB2 10.5發佈了,其中一個比較搶眼的特性就是BLU加速器,也就是講列式存儲技術開始引入傳統數據庫中,但目前BLU特性只是支持一些特定的的版本主要是AIX和linux 64位平臺的DB2 AESE版本的數據庫,因此外界其實能接觸的機會並很少,先給你們看看BLU的配置吧。linux

我使用的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".
app

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"async

最簡單的配置列式存儲的方式是,使用用戶環境變量參數DB2_WORKLOAD,DB2 10.5多了個取值
ide

db2set DB2_WORKLOAD=ANALYTICS測試

設置好後重啓實例便可,此時建立DB便可支持列式存儲fetch

固然還有就是從低版本升級過來或者以前未啓用列式存儲的,DB也提供了簡單的自動配置方法,修改以上參數後重啓實例,而後使用自動配置便可:spa

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.rest


能夠看到DFT_TABLE_ORG的值由row修改成column了,也就是之後建立的表默認就是列式存儲表了,據測試來看列式存儲確實在空間使用和SQL查詢效率上提升了不少,不過改特性只能支持單表的,對於分表/DPF/MDC/PureScale環境下的表仍是不能支持的,好,如今就說初步瞭解下,之後會有更多的實際應用案例吧。
code

相關文章
相關標籤/搜索