Oracle compress table is an new feature since Oracle 9i, it could save you a lot of storage, I have seen this new feature used in data warehouse. In oracle 9i, compress table have some bugs, for example cannot modify table structure, I do believe Oralce will fix these problems. So I want to add compress table support in AUL/MyDUL, following is a first step of my research, I found this out on the train.
Compress need some metadata, in Oracle, the compress unit is block, which means that in a compress table, some blocks are compressed, and some are not, depend on whether compress can save space for you. We could call the compress block is self contained, no dictionary information required from system tables when extracting.
I create a test table contains two column (col1 and col2), the values of col1 are "Compress1" and "Compress2", the values of col2 are "Compress Row1" and "Compress Row2", I insert into the table with different combination of values. Then dump a block, there are 709 rows in one 8k size block.
The structure of compress block seems likely with cluster block, the table count is marked as 2, table 0 is the different combination of words list, as following:
tab0:
0 = Compress1
1 = Compress2
3 = Compress Row1
4 = Compress Row2
5 = 0 3
6 = 0 4
7 = 1 3
8 = 1 4
Table 1 contains the real rows:
tab1:
0 = Flag Trans Field count 5
1 = Flag Trans Field count 6
2 = Flag Trans Field count 7
3 = Flag Trans Field count 8
4 = Flag Trans Field count 6
5 = Flag Trans Field count 7
......
These is all I have for compress table. (Moved from anysql.net)
