Professional Documents
Culture Documents
__2. In GNOME Command window, type cd4 to change the directory to Lab 04.
$ cd4
__4. Run compress01 to find out the storage paths used by all 3 databases.
$ ./compress01
__5. Run df –h command to find out the file system sizes for above database storage paths.
$ df -h
__6. Please notice that the size of the row organized uncompressed database (DB2DB) is 20GB
compared to 10.4 GB of compressed row organized database (ROWDB).
__8. Run compress02 to determine the size of tables and compare the sizes with the other
databases.
$ ./compress02
__9. Please notice that the size of tables (including index and other objects) is 5.19 times smaller than
the original uncompressed database size.
__10. Run compress03 to check sizes of the individual tables in all 3 different databases.
$ ./compress03
__11. Run compress04 to check sizes of the individual tables (including indexes) from 3 different
databases and how they compare with each other with compression ratios.
$ ./compress04
__12. Please note from the output from the script compress04 that BLU.FACT_RX shows 8.49 times
compression ratio whereas BLU.PRODUCT shows 1.15 times compression ratio.
Note: The script compress04 shows compression ratio for table FACT_RX 8.49
times whereas compress05 shows it as 4.34 only.
This is due to the fact that the script compress04 includes indexes size
along with table size whereas compress05 script takes into account only
the table size.
__a. Column organized tables do not need indexes except internal indexes which keep track of
the disk page map with Tuple Sequence Number (TSN) stored in the synopsis table for
each column organized table.
__b. The fact tables FACT_RX and FACT_DX in DB2DB and ROWDB databases contain several
indexes required to meet the needs of the different queries.
__c. There is no external indexes required on fact tables when they are created as column
organized. This frees up the space required by indexes which sometime can be greater
than the size of the individual table.
__d. Please notice that the index space saving for the FACT_RX tables is 1848 times mainly due
to the fact that the internal index size is very small in column organized table.
__e. The space saving realized is more when the size of the table is large, which is typically the
case with the large fact tables in an analytics database.
__17. Please notice that the percent encoding at the column level is more than 90% for all columns
except FACT_RX.VISIT_KEY column which is VARCHAR(26) holding numeric data.