ob_default_lob_inrow_threshold

2024-03-05 01:54:26  Updated

Note

This variable is introduced since OceanBase Database V4.2.0 BP2.

Description

ob_default_lob_inrow_threshold specifies the default INROW storage threshold for LOB fields in a table.

Applicability

This variable is applicable only to OceanBase Database Community Edition and is not supported in OceanBase Database Enterprise Edition.

Attributes

Attribute Description
Type Integer
Default value 4 KB (The unit is byte.)
Value range [0, 0.75 MB]. The value 0 indicates that INROW storage is disabled.
Applicable scope
  • Global
  • Session
Modifiable Yes. You can use the SET statement to modify the variable.

Considerations

  • If you do not specify LOB_INROW_THRESHOLD when you create a table, the value of this variable is written to the schema of the table.
  • The modification of this variable does not affect the INROW threshold of existing tables, but affects new tables for which LOB_INROW_THRESHOLD is not specified.

Examples

In the following example, LOB_INROW_THRESHOLD is not specified:

  1. Set ob_default_lob_inrow_threshold to 40,960 bytes.

    • Set the variable at the session level as follows:

      obclient> SET ob_default_lob_inrow_threshold = 40960;
      
    • Set the variable at the global level as follows:

      obclient> SET GLOBAL ob_default_lob_inrow_threshold = 40960;
      
  2. Create a table named t without specifying LOB_INROW_THRESHOLD.

    obclient> CREATE TABLE t(pk int, data text);
    

The value of ob_default_lob_inrow_threshold is used as the threshold. That is, the INROW threshold of the t table is 40,960 bytes.

Contact Us