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 COMPRESSIONsum 1,460.31 row selected.Elapsed: 00:00:00.02SYS@SANDBOX1> -- It says ARCHIVE HIGH, but obviously the data has not been compressed.SYS@SANDBOX1>SYS@SANDBOX1> alter table kso.skew move compress for query low parallel 32;Table altered.Elapsed: 00:00:09.60SYS@SANDBOX1> @table_size2Enter value for owner: KSOEnter value for table_name: SKEWOWNER SEGMENT_NAME TOTALSIZE_MEGS COMPRESS_FOR-------------------- ------------------------------ -------------- ------------KSO SKEW 301.3 QUERY LOW--------------sum 301.3Elapsed: 00:00:00.02You could probably guess that the first ALTER command (without the MOVE keyword) didn’t really doanything to the existing data. It only took a few hundredths of a second, after all. And as you can seewhen we looked at the size of the table, it did not compress the existing data, even though the datadictionary now says the table is in ARCHIVE HIGH mode. When we added the MOVE keyword, the table wasactually rebuilt with the new compression setting using direct path inserts and as you can see, the datahas been compressed from the original 1,406MB to 301MB.In this section we briefly described each of the three types of compression available in <strong>Oracle</strong>. Sincethis chapter is focused on HCC, we won’t discuss the other methods further except as they relate to howHCC works.HCC MechanicsHCC works by storing data in a nontraditional format—nontraditional for <strong>Oracle</strong>, anyway. Data storedusing HCC still resides in <strong>Oracle</strong> blocks, and each block still has a block header. But the data storage hasbeen reorganized. In the first place, the blocks are combined into logical structures called compressionunits, or CUs. A CU consists of multiple <strong>Oracle</strong> blocks (usually adding up to 32K or 64K). Figure 3-5shows a logical representation of how CUs are laid out.72

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

Saved successfully!

Ooh no, something went wrong!