BLU Defies
 DB2 uses row-organized tables
 Good for OLTP
 Storage required for tables and indexes
 Fetching Large table is i/o Intensive
What are we doing now
Row Organized Table
Employee ID Last Name First Name Salary
1 Manager SuperPay 10000000
2 DBA HighPressure 80000
3 Programmer BlameDBA 100000
4 Tester BlameAllOthers 100000
5 CEO Iam Boss 1000000000000000
1, Manager, SuperPay, 10000000; 2, DBA, Highpressure, 80000; 3, Programmer, BlameDBA, 100000
PAGE 1 PAGE 2
Works like this
db2 “select salary from schema.employee where salary < 20000000”;
Employee ID Last Name First Name Salary
1 Manager Super Pay 10000000
2 DBA High Pressure 80000
3 Programmer Blame DBA 100000
4 Tester Blame All Others 100000
5 CEO Iam Boss 1000000000000000
Employee ID Last Name First Name Salary
1 Manager Super Pay 10000000
2 DBA High Pressure 80000
3 Programmer Blame DBA 100000
4 Tester Blame All Others 100000
db2 “select c1, c2, c3 from column100 where <>”;
97%
 DB2 introduces column-organized tables
 Good for OLAP
 Efficient Compression
What’s New
How do I create…
db2 "CREATE TABLE <emp> (colname datatype)
ORGANIZE BY COLUMN;
OR
Set DB CFG : dft_table_org
OR
Set DB2_WORKLOAD registry variable to ANALYTICS
How does it look?
ID
1
2
3
4
5
Last Name
Manager
DBA
Programmer
Tester
CEO
First Name
Superpay
Highpressure
BlameDBA
Blameallothers
IamBoss
Salary
1000000
80000
100000
100000
100000000000
PAGE 1 PAGE 2 PAGE 3
Employee ID Last Name First Name Salary
1 Manager SuperPay 10000000
2 DBA HighPressure 80000
3 Programmer BlameDBA 100000
4 Tester BlameAllOthers 100000
5 CEO IamBoss 1000000000000000
1 2 3 4 5 Manager DBA Programmer
Tester CEO
Superpay Highpressure BlameDBA
Blameallothers IamBoss
Highly Efficient Compression
ID
1
2
3
4
5
Last Name
Manager
DBA
Programmer
Tester
CEO
First Name
Superpay
Highpressure
BlameDBA
Blameallothers
IamBoss
Salary
1000000
80000
100000
100000
100000000000
Works like this
db2 “select salary from schema.employee where salary < 20000000”;
Salary
1000000
80000
100000
100000
 Perform Efficient reads
 Store Data in a compressed format
 Achieve disk savings
 Reduce I/O
 Rapid columnar operations- MIN, MAX, SUM, COUNT and
AVG
Goal is to
 OLAP/DSS systems
 Fetch subset of columns
 Optimize analytic query performance
 Workloads accesses more than 5-10% of data
Ideal to use with…
Which one to choose?
Row Organized Table Column Organized Table
Suitable for OLTP Suitable for OLAP
I/O intensive Reduced I/O
Limited compression Efficient compression
Can co-exist in the same DB, TBSP or Schema
Took references from
http://en.wikipedia.org/wiki/Column-
oriented_DBMS
http://pic.dhe.ibm.com/infocenter/db2luw/v1
0r5/topic/com.ibm.db2.luw.admin.dbobj.doc/
doc/c0060592.html
http://it.toolbox.com/blogs/db2luw/column-
organized-table-storage-in-db2-105-with-
blu-acceleration-57502
Welcome to BLU at http://ibmbluhub.com/get-blu/
Thank you
Twitter : raja_iaf
Linkedin : www.linkedin.com/in/lrajasekhar/
Blog : coming soon….

Blu defies gravity