DB2 with BLU Acceleration deployment made easy
W.J.Chen 11000066R1 Visits (6506)
Deploying DB2 with BLU Acceleration is simple. With only handful of commands, you can turn on analytics mode, create a new or auto-configure an existing database to make best use of your hardware for analytics, and then load the data.
Installing DB2 10.5
The first step is to install DB2 for Linux, UNIX, and Windows Version 10.5 on the currently supported platforms, either AIX on POWER® or Linux on x86 64-bit.
The BLU Acceleration feature comes with the following DB2 editions:
Enable one DB2 registry variable
The DB2 registry variable, DB2_WORKLOAD, is a single setting to enable BLU Acceleration. Setting this registry variable to ANALYTICS lets DB2 aware that the database is used for analytic workloads. It automatically configures relevant configuration parameters to optimize existing hardware capacity and performance of analytic workloads.
The following commands enable DB2_WORKLOAD registry variable:
In a typical scenario for analytical workloads, a DB2 instance would hold a single database. When creating a new database, it should be created with a UNICODE code set, IDENTITY collation, and automatic storage management. All these settings are default and do not need to be specified explicitly.
The following example creates a database name GS_DB and assigns 100% of the instance memory to this database. The autoconfigure applies all tuning parameters to the instance and to the database. The new database is optimized for analytic workloads based on available hardware. Autoconfigure does not use all the memory on the system by default. If DB2 with BLU Acceleration is the only software running on the server, specify how much memory to use.
db2 CREATE DB GS_DB ON /dbpath/gs_db AUTOCONFIGURE USING mem_percent 100 APPLY DB AND DBM
Creating table and loading data
Now, you can start creating and loading your tables, for example:
db2 CREATE TABLE GOSA
If you already have existing table and object creation DDL statements from an existing data warehouse, you can reuse them without having to make changes to the table creation statements. Both column and row organization tables can coexist in the same database and even in the same table space. If DB2_WORKLOAD is set to ANALYTICS, the default table organization (DFT_TABLE_ORG) is set to column-organized. The new CREATE TABLE statement includes a new keyword ORGANIZE BY. This allows tables to be created with an explicit definition of either ORGANIZE BY ROW or ORGANIZE BY COLUMN. This easily overrides the value assigned to the DFT_TABLE_ORG parameter. After all the tables are created, you can start loading tables. Note that there is no new syntax of data loading required,
More about DB2 with BLU Acceleration deployment
Although the best practice is to create a BLU-accelerated database in its own instance, it is possible to create and enable a BLU database in an instance that has multiple databases, if required.
Upgrading from the previous version of DB2 release to DB2 10.5 requires the database to be already using a UNICODE code set and IDENTITY collation. If this is not the case, a new database must be created after the DB2 instance is upgraded to DB2 10.5 and activated for BLU Acceleration.