Team Fly | ![]() ![]() |
Object Type |
Compression Property Inheritance Parent |
Table |
Tablespace |
Materialized View |
Tablespace |
Partition |
Table |
TABLE 9-13. Compression Property Inheritance |
The following listing demonstrates the creation of a table with compression enabled. Line 7 contains the keyword compress to tell Oracle that data compression is to be enabled.
1 create table commission ( 2 sales_rep_id number, 3 prod_id number, 4 comm_date date, 5 comm_amt number(10,2)) 6 tablespace comm_ts pctfree 5 initrans 1 maxtrans 255 7 compress;
Because compression can be enabled or disabled at different points in an object's lifetime (say, by using an alter command), and because the compression action only occurs on new data being loaded, it is possible for an object to contain both compressed and uncompressed data at the same time.
Team Fly | ![]() ![]() |