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 COMPRESSIONsum 15,347.51 row selected.SYS@SANDBOX> !cat comp_ratio.sqlcompute sum of totalsize_megs on reportbreak on reportcol owner for a10col segment_name for a20col segment_type for a10col totalsize_megs for 999,999.9col compression_ratio for 999.9select owner, segment_name, segment_type type,sum(bytes/1024/1024) as totalsize_megs,&original_size/sum(bytes/1024/1024) as compression_ratiofrom dba_segmentswhere owner like nvl('&owner',owner)and segment_name like nvl('&table_name',segment_name)and segment_type like nvl('&type',segment_type)group by owner, segment_name, tablespace_name, segment_typeorder by 5;SYS@SANDBOX1> @comp_ratioEnter value for original_size: 15347.5Enter value for owner: KSOEnter value for table_name: SKEW3%Enter value for type:OWNER SEGMENT_NAME TYPE TOTALSIZE_MEGS COMPRESSION_RATIO---------- -------------------- ------------------ -------------- -----------------KSO SKEW3_NONE TABLE 15,370.8 1.0KSO SKEW3_OLTP TABLE 10,712.7 1.4KSO SKEW3_BASIC TABLE 9,640.7 1.6KSO SKEW3_HCC1 TABLE 3,790.1 4.0KSO SKEW3_HCC3 TABLE 336.9 45.6KSO SKEW3_HCC2 TABLE 336.7 45.6KSO SKEW3_HCC4 TABLE 274.3 55.9--------------sum 25,091.47 rows selected.The listing shows the commands used to create compressed versions of the SKEW3 table. We alsoloaded an uncompressed version for a timing reference. Note also that the SKEW3 table is highlycompressible due to many repeating values in a small number of columns. It’s a little hard to pick outthe information from the listing, so Table 3-2 summarizes the data in a more easily digested format.75

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

Saved successfully!

Ooh no, something went wrong!