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, Adaptive Server compresses all subsequent data inserted in the table that uses the appropriate datatype. If you set compression off, Adaptive Server disables compression for the duration of the session. When you set compression to default, Adaptive Server uses the compression configuration you established when you created the table.

Adaptive Server does not support session-level compression for LOB compression.

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, Adaptive Server restores the compression level of the outer session or parent procedure.

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.