Session-Level Data Compression

Enable and disable compression for a session with the set command.

To enable compression for the current session, use:
set compression {on | off | default}

This command has no effect on uncompressed tables. When you enable compression for a session, all subsequent data inserted in the table that uses the appropriate datatype is compressed. If you set compression off, compression for the duration of the session is disabled. When you set compression to default, the compression configuration you established when you created the table is used.

Session-level compression for LOB compression is not supported.

Stored or system procedures inherit a session’s compression settings. Subprocedures inherit the set compression command settings executed in the parent procedure. When the procedure ends, the compression level of the outer session or parent procedure is restored.

set compression changes included with login triggers apply to the session established when you first log in until you explicitly change the compression level. You need not enable set export_options in the login trigger to export set compression changes. Once the compression level is exported to a session, it applies to individual tables. However, set compression is not exported to the immediate parent procedure’s context if you issue set export_options in a nested procedure before setting issuing set compression.

See Reference Manual: Commands.