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 COMPRESSIONSYS@SANDBOX1> select col1 from kso.skew_hcc3 where pk_col = 27999409 for update nowait;select col1 from kso.skew where pk_col = 16858437 for update nowait*ERROR at line 1:ORA-00054: resource busy and acquire with NOWAIT specified or timeout expiredSYS@SANDBOX1> -- Expected because this row has been updated by another processSYS@SANDBOX1>SYS@SANDBOX1> select col1 from kso.skew_hcc3 where pk_col = 27999401 for update nowait;select col1 from kso.skew where pk_col = 16858429 for update nowait*ERROR at line 1:ORA-00054: resource busy and acquire with NOWAIT specified or timeout expiredSYS@SANDBOX1> -- Not normal <strong>Oracle</strong> locking behaviorClearly this behavior would be disastrous to many OLTP systems. Especially when you consider thelarge number of records that can be stored in an HCC block. In this case that number is approximately13,500 rows per block. This means that a single update could lock well over 50,000 rows.Single Row AccessHCC is built for full table scan access. Decompression is a CPU-intensive task. Smart Scans candistribute the decompression work to the CPU’s on the storage cells. This makes the CPU-intensive taskmuch more palatable. However, Smart Scans only occur when Full Scans are performed. This meansthat other access mechanisms, index access for example, must use the DB server CPUs to performdecompression. This can put an enormous CPU load on DB servers in high volume OLTP-type systems.In addition, since data for a single row is spread across multiple blocks in a CU, retrieving a completerow causes the entire CU to be read. This can have a detrimental effect on the overall database efficiencyfor systems that tend to access data using indexes, even if the access is read-only.Common Usage ScenariosHCC provides such high levels of compression that it has been used as an alternative to traditional ILMstrategies, which generally involve moving older historical data off the database entirely. These ILMstrategies usually entail some type of date range partitioning and a purge process. This is done to freestorage and in some cases to improve performance. Often the data must be retained in some backupformat so that it can be accessed if required at some later date. With HCC, it is possible in many cases toretain data indefinitely by compressing the oldest partitions. This approach has many advantages overthe traditional approach of moving the data.First and foremost, the data remains available via the standard application interfaces. No additionalwork will need to be done to restore a backup of old data before it can be accessed. This advantage aloneis often enough to justify this approach. This approach typically entails leaving active partitionsuncompressed while compressing old partitions more aggressively. Here’s a short example of creating apartitioned table with mixed compression modes.SYS@DEMO1> CREATE TABLE "KSO"."CLASS_SALES_P"2 ( "TRANS_ID" VARCHAR2(30),3 "UNIT_ID" NUMBER(30,0),4 "DAY" NUMBER(30,0),102

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

Saved successfully!

Ooh no, something went wrong!