Sunday, March 3, 2013

ORACLE - EXADATA - HCC

Exadata Hybrid Columnar COmpression Architecture Overview:                    
                    Tables are organized into sets of rows called COMPRESSION UNIT. It is  is a logical structure spanning multiple database blocks.Within a compress unit, data is organized by column and then compressed.The coulmnn organized of data brings similar values close together, engancing the compression ratios.Each roe is self-contained with a compression unit.

                    Compression not only reduces the storage requirements for historical data but also reduce the size of data used by the Oracle database,with corresponding reductions in MEMEORY and an increase in I/O bandwith.

HCC copression type:
1) CREATE TABLE .....COMPRESS FOR QUERY LOW;    (Expected compression ration: 4X)
2) CREATE TABLE .....COMPRESS FOR QUERY HIGH;   (Expected compression ration: 6X)
3) CREATE TABLE .....COMPRESS FOR ARCHIVE LOW;  (Expected compression ration: 7X)
4) CREATE TABLE .....COMPRESS FOR ARCHIVE HIGH; (Expected compression ration: 12X)

Best practice to loda the data into HCC tables:
1) Direct path SQL*Loader
2) CREATE TABLE and AS SELECT statements
3) Parallel INSERT (or serial INSERT with an APPEND hint) statements

Example of compress and nocompress:
create table JTABLE (ID numeric(10))
partition by range (ID)
(partition p1 values less than (100000) nocompress,
partition p2 values less than (200000) compress for archive low,
partition p3 values less than (300000)  compress for query high,
partition p4 values less than (maxvalue) compress for query low)
enable row movement;
Alter table ORDERS modify partition P2 nocompress;
Select PARTITION_NAME,COMPRESSION, COMPRESS_FOR from DBA_tab_partitions where TABLE_NAME like 'JTABLE';

Ref. Oracle Docs/Metalink

No comments:

Post a Comment