Databases Reference
In-Depth Information
Chapter 16
Hybrid Columnar Compression
Exadata Hybrid Columnar Compression, or HCC, is a type of segment compression first made available by Oracle on
the Exadata Database Machine. HCC is designed to provide the highest levels of database segment compression.
With HCC, data is organized for storage by columns. Oracle uses the concept of a “compression unit” (CU)
with HCC, which stores data by columns but only for a set of rows—this collection of groups of rows organized and
compressed together is what leads to the “hybrid” tag in the feature name.
HCC offers very high compression ratios for QUERY compression and even higher compression ratios for ARCHIVE
compression. Higher compression ratios mean two things: less disk space is required to store large objects and there
is potential for better I/O performance.
But HCC comes at a cost if not implemented appropriately. In this chapter, we'll cover HCC basics, compare
it with other compression alternatives, show when to use HCC and when not to, and show you how to measure the
impact of Hybrid Columnar Compression for your database.
16-1. Estimating Disk Space Savings for HCC
Problem
You wish to estimate the disk space savings you will attain by compressing a table with Hybrid Columnar
Compression.
Solution
In this recipe, you will learn how to use the compression advisor to estimate the disk space requirements and
compression ratio for an existing, uncompressed table. Start by logging in to SQL*Plus in an existing Oracle
11g database and execute the script in Listing 16-1. This script will prompt you for a “scratch” tablespace
(which cannot be defined with uniform extent allocation), a table owner, and table name.
Not When you execute the compression advisor, Oracle will temporarily create and subsequently drop an actual physical
segment in your database, based on the input compression type supplied to DBMS_COMPRESSION.GET_COMPRESSATION_RATIO .
This segment could very well be large, based on the size of the table you are performing the analysis with, so you should make
sure you have sufficient disk space to execute the advisor and, ideally, execute the advisor during off-peak hours.
Another topic worth mentioning is that while HCC is only available on Exadata and other Oracle storage products
(ZFS Storage Appliance and Pillar Axiom), the compression advisor is shipped with Oracle 11g and can be executed from
a non-Exadata database.
 
 
Search WWH ::




Custom Search