10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 HYBRID COLUMNAR COMPRESSIONDatabase version 11g Release 1. The storage format is essentially the same as BASIC, using a symboltable to replace repeating values. OLTP compression attempts to allow for future updates by leaving 10percent free space in each block via the PCTFREE setting (BASIC compression uses a PCTFREE value of 0percent). Therefore, tables compressed for OLTP will occupy slightly more space than if they werecompressed with BASIC (assuming direct path loads only and no updates). The syntax for enabling thistype of compression isCREATE TABLE … COMPRESS FOR OLTP;Alternatively, the syntax COMPRESS FOR ALL OPERATIONS may be used, although this syntax is nowdeprecated. OLTP compression is important because it is the fallback method for tables that use HCCcompression. In other words, blocks will be stored using OLTP compression in cases where HCC cannotbe used (non-direct path loads for example). One important characteristic of OLTP compression is thatupdates and non-direct path inserts are not compressed initially. Once a block becomes “full” it will becompressed. We’ll revisit this issue in the performance section of this chapter.HCCHCC is only available for tables stored on <strong>Exadata</strong> storage. As with BASIC compression, data will only becompressed in HCC format when it is loaded using direct path loads. Conventional inserts and updatescause records to be stored in OLTP compressed format. In the case of updates, rows are migrated to newblocks. These blocks are marked for OLTP compression, so when one of these new blocks is sufficientlyfull, it will be compressed using the OLTP algorithm.HCC provides four levels of compression, as shown in Table 3-1. Note that the expectedcompression ratios are very rough estimates and that the actual compression ratio will vary greatlydepending on the data that is being compressed.Table 3-1. HCC Compression TypesCompressionTypeQUERY LOWQUERY HIGHARCHIVE LOWDescriptionHCC level 1 uses the LZO compression algorithm. This levelprovides the lowest compression ratios but requires the least CPUfor compression and decompression operations. This algorithm isoptimized for maximizing speed rather than compression.Decompression is very fast with this algorithm. You may see somedocuments refer to this level as WAREHOUSE LOW.HCC level 2 uses the ZLIB (gzip) compression algorithm. Somedocuments refer to this level as WAREHOUSE HIGH.HCC level 3 uses the ZLIB (gzip) compression algorithm as well,but at a higher compression level than QUERY HIGH. Depending onthe data, however, the compression ratios may not be muchhigher than with QUERY HIGH.ExpectedCompression Ratio4×6×7×69

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

Saved successfully!

Ooh no, something went wrong!