June 2018
Intermediate to advanced
478 pages
10h 52m
English
Db2 organizes data as rows or as columns. A single data page will contain data from one column, and data is deleted or inserted, but never updated. Isolation level Currently Committed (CC) is supported in column organized pages, by keeping track of both current and previous copies of the slot.
The DDL differences between a row- and column-organized table are minimal, and can be seen in the following table:
|
Column-Organized Table |
Row-Organized Table |
| CREATE TABLE "DEMO"."T3" ( "ID" INTEGER NOT NULL, "NAME" VARCHAR(20 OCTETS) , "ADDRESS" VARCHAR(50 OCTETS) , "SALARY" INT ) DISTRIBUTE BY HASH("ID") IN "USERSPACE1" ORGANIZE BY COLUMN; | CREATE TABLE "DEMO"."T4" ( "ID" INTEGER NOT NULL, "NAME" VARCHAR(20 OCTETS) ... |
Read now
Unlock full access