Altering the Compression Level of a Table or Partition

alter table does not affect the compression level of existing data, but affects the compression level of new or changed data rows produced by subsequent DML operations.

alter table lets you:
  • Enable compression on uncompressed tables or partitions, and disable compression on already compressed tables or partitions.

  • Change the compression type (row or page) for compressed tables.

  • Alter a column in a compressed table to allow or disallow compression.

Note:

You must set the compression level for a table before you can modify a column for compression.

Alter the compression level of existing tables or partitions using:
alter table table_name
{
modify column [not] compressed
},
{
modify partition partition_name, [partition_name . . .] 
set compression = {default | none | row | page}
},
{set compression = {none | page | row}}

See the Reference Manual: Commands.

This example alters the sales_data table for compression:
alter table sales_data
set compression = row
This example modifies the isbn column for compression:
alter table sales_data
modify isbn compressed