วันพุธที่ 31 ตุลาคม พ.ศ. 2555

Compressing Data for Direct Path Loading


You’re working with a decision support system (DSS)-type database and you want to improve the
performance of an associated reporting application. This environment contains large tables that are
loaded once and then frequently subjected to full table scans. You want to compress data as it is loaded
because this will compact the data into fewer database blocks and thus will require less I/O for
subsequent reads from the table. Because fewer blocks need to be read for compressed data, this will
improve data retrieval performance.

How ?

Use Oracle’s basic compression feature to compress direct path–loaded data into a heap-organized
table. Basic compression is enabled as follows:
1. Use the COMPRESS clause to enable compression either when creating, altering,
or moving an existing table.
2. Load data via a direct path mechanism such as CREATE TABLE…AS SELECT or
INSERT /*+ APPEND */.

For Example

you’re working with a table has that already been created, then you can alter its basic compression
characteristics with the ALTER TABLE statement—for example:
SQL> alter table regs_dss compress;

When you alter a table to enable basic compression, this does not affect any data currently existing
in the table; rather it only compresses subsequent direct path data load operations.
If you want to enable basic compression for data in an existing table, use the MOVE COMPRESS clause:
SQL> alter table regs_dss move compress;


Thank for good information from good oracle book "Oracle Database 11g Performance Tuning Recipes"

Hope this help you to more understand :D
Chatchai Komrangded

ไม่มีความคิดเห็น:

แสดงความคิดเห็น