Guidelines to add support for data compression of 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 implemented.

Enabling data compression

You can enable data compression by using either customization or configuration methods.

Enabling data compression by using customization
  • 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 that are available for compression, see Table 1.
Enabling data compression by using configuration
  • 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.
    • db.force.compression.tables

      Using force compression properties, you can configure compression-supported columns to compress data when size reaches the threshold limit. Set this property to specify the table names where the columns to be compressed belong to. For each of the tables specified in the property, construct another property as db.force.compression.<table name>.columns to set the column names to enable compression.

      Note: Only those tables that support compression columns can be set as a force compression table. If the columns to be compressed are in multiple tables, separate each table name by comma.
    • db.force.compression.<table name>.columns

      To enable data compression, for each of the table names that are specified in db.force.compression.tables, use the db.force.compression.<table name>.columns property to construct properties and set the column names of the respective tables. Do not specify a table for compression unless you want to compress a column in that table. If force compression tables are specified in the property, then for each of the tables, it is mandatory to provide column names as shown in the following example.

      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

      When multiple columns of a table are to be compressed, separate each column by a comma.

  • You can set db.force.compression.history.records property to true to enable data compression on all the compression supported columns when writing data to history tables. The property ensures that the data that is written in history tables is compressed even if compression is not enabled for the compression supported columns in transaction table. By default, the property is considered as false.

Data compression considerations

When adding support for data compression to the columns of standard tables, consider the following points:
  • Data Compression must 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 use a significant amount of space within the database.
  • Columns that use 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 must 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 that contains the data compression logic.

Columns available for compression

The following table lists the columns in the tables that supports compression.
Table 1. Columns 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
Next-generation platform

Columns compressed by default

The following CLOB columns are compressed by default in the lower environments (Development, QA, and Master Configuration). You cannot override this compression.
Table 2. CLOB columns compressed by default
Table name Column name
YFS_ORDER_AUDIT_DETAIL AUDIT_XML
YFS_AUDIT AUDIT_XML
YFS_EXPORT MESSAGE
YFS_IMPORT MESSAGE
YFS_REPROCESS_ERROR MESSAGE
INTEROP_ERROR_DISPATCH MESSAGE
YFS_INBOX INBOX_ADDNL_DATA

Data compression logic

The data for compressible columns is compressed by 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.