10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 HYBRID COLUMNAR COMPRESSIONCompressionTypeARCHIVE HIGHDescriptionHCC level 4 compression uses Bzip2 compression. This is thehighest level of compression available but is far and away the mostCPU-intensive. Compression times are often several times slowerthan for levels 2 and 3. But again, depending on the data, thecompression ratio may not be that much higher than with ARCHIVELOW. This level is for situations where the time to compress data isrelatively unimportant or where space is in critically short supply.ExpectedCompression Ratio12×COMPRESSION ALGORITHMSThe references to the specific algorithms associated with HCC compression (LZO, ZLIB, or BZIP2) are allinferred from the function names used in the <strong>Oracle</strong> code. The ORADEBUG utility provides a direct interfaceinto the <strong>Oracle</strong> call stack via the SHORT_STACK command. Operating system utilities such as pstack canalso provide the same information. As an example, here is a part of the stack dump for a process doingARCHIVE HIGH compression.->kgccbzip2pseudodo()->kgccbzip2do()->BZ2_bzCompress()->handle_compress()->BZ2_compressBlock()Tables may be compressed with HCC using the following syntax:CREATE TABLE ... COMPRESS FOR QUERY LOW;CREATE TABLE ... COMPRESS FOR QUERY HIGH;CREATE TABLE ... COMPRESS FOR ARCHIVE LOW;CREATE TABLE ... COMPRESS FOR ARCHIVE HIGH;You may also change a table’s compression attribute by using the ALTER TABLE statement. However,this command has no effect on existing records unless you actually rebuild the segment using the MOVEkeyword. Without the MOVE keyword, the ALTER TABLE command merely notifies <strong>Oracle</strong> that future directpath inserts should be stored using HCC. By the way, you can see which form of compression a table isassigned, if any, using a query like this:SYS@SANDBOX1> select owner, table_name, compress_for2 from dba_tables3 where compression = ‘ENABLED’4 and compress_for like nvl('&format',compress_for)5* order by 1,2;OWNER TABLE_NAME COMPRESS_FOR------------------------------ ------------------------------ ------------KSO SKEW2_BASIC BASICKSO SKEW2_HCC1 QUERY LOW70

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!