Guidelines for adding support for data compression for columns
You can enable data compression for new and existing columns of Standard, Custom, or Hang-off tables. The data compression allows a reduction in size for tables when being implemented.
Enabling data compression
You can enable data compression by using either customization or configuration methods.
- For custom columns, you can enable data compression by adding both CompressionSupported="true" and UseCompression="true" in the entity XML.
- For existing columns in a standard table, you can enable data compression by overriding the
value of the UseCompression attribute.Note: You can enable data compression only for existing columns that have the CompressionSupported attribute set to True.
To view the list of columns of standard tables available for compression, see Columns available for compression.
- Compression can be enabled by configuring the following compression properties so that the
column data can be compressed anytime without having to customize, rebuild, and redeploy Sterling Order Management System Software.
db.force.compression.tables
: Configure this property to specify the table names where the columns to be compressed belong to.db.force.compression.<table name>.columns
: To enable data compression, for each of the table names that are specified indb.force.compression.tables
, usedb.force.compression.<table name>.columns
to construct properties and set the column names of the respective tables. For example, to compress AUDIT_XML column of table YFS_ORDER_AUDIT_DETAIL, set properties as:db.force.compression.tables=YFS_ORDER_AUDIT_DETAIL
db.force.compression.YFS_ORDER_AUDIT_DETAIL.columns=AUDIT_XML
- You can use the
db.force.compression.history.records
property to enable data compression on all the compression supported columns when writing data to history tables. The property ensures that the data written in history tables is compressed even if compression is not enabled for the compression supported columns in transaction table.
Data compression considerations
- Data Compression should be used only for columns that contain a large amount of text data that is typically not queried directly, such as audit records, error stack traces, and XML template data. The nature of these records can consume a significant amount of space within the database.
- Columns using CompressionSupported="true" do not support query operations from list APIs. This can be overridden by setting the QueryAllowed attribute to True in the entity XML.
- By default, columns that use CompressionSupported="true" cannot be used as part of an index or unique constraint. This can be overridden by setting the AllowCompressedColumns attribute to True on the index element in the entity XML.
- Primary Key columns cannot be marked as compressible columns.
- Data compression should be enabled only if the maximum size of the column is >= 500 bytes. Any column that is marked for data compression with less than 500 bytes results in warnings.
- By default, the data compression is done by using the GZip algorithm. You can override this default data compression logic by setting the yfs.db.compression.class=class name property in the customer_overrides.properties file. In the class name, specify the name of your custom class, which contains the data compression logic.
Columns available for compression
Table name | Column name |
---|---|
INTEROP_ERROR_DISPATCH | MESSAGE |
PLT_ACTIVITY_CONFIG | CONFIG_XML |
PLT_ACTIVITY_CONFIG_METADATA | CONFIG_METADATA_XML |
PLT_EOF_STATUS | MESSAGE |
PLT_FILE_DATA | DATA_OBJECT |
YCS_MANIFEST_UPS_DTL | INPUT_XML |
YFS_ASYNC_REQ | MESSAGE |
YFS_ASYNC_REQ_ERROR | ERROR_MESSAGE |
YFS_AUDIT | AUDIT_XML |
YFS_BATCH | REQ_BATCH_COMPLETION_XML |
YFS_CATALOG_MASS_AUDIT | CHANGE_XML |
YFS_EXPORT | MESSAGE |
YFS_GRAPH_UI | GRAPH_XML |
YFS_HM_THRESHOLDS | ADDITIONAL_INFO |
YFS_IMPORT | MESSAGE |
YFS_INBOX | INBOX_ADDNL_DATA |
YFS_INBOX_NOTES | NOTE_TEXT |
YFS_INBOX_REFERENCES | VALUE |
YFS_INSTRUCTION_DETAIL | INSTRUCTION_TEXT |
YFS_INVENTORY_ALERTS | AVAILABILITY_INFO |
YFS_NOTES | NOTE_TEXT |
YFS_ORDER_AUDIT_DETAIL | AUDIT_XML |
YFS_PERSON_INFO | ERROR_TXT |
YFS_RESOURCE | INPUT |
YFS_RESOURCE | TEMPLATE |
YFS_REPROCESS_ERROR | ERROR_REFERENCE |
YFS_REPROCESS_ERROR | ERRORSTRING |
YFS_REPROCESS_ERROR | ERRORMESSAGE |
YFS_REPROCESS_ERROR | MESSAGE |
YFS_SAVED_SEARCH | SEARCH_DATA |
YFS_SUB_FLOW | CONFIG_XML |
YPM_MASS_AUDIT | SEARCH_CRITERIA_XML |
Data compression logic
The data for compressible columns is compressed using the GZip algorithm. You can override this default data compression logic and provide your custom compression logic by implementing the SCICustomDataCompressor interface.
You must enter the name of the custom class that implements the SCICustomDataCompressor interface in the yfs.db.compression.class=class name property in the customer_overrides.properties file.