Note
This variable was introduced in OceanBase Database V4.2.1 BP2.
Description
ob_default_lob_inrow_threshold specifies the default INROW storage threshold for LOB fields in a table.
Applicability
This variable is applicable to only OceanBase Database in MySQL mode.
Limitations
Query the variable
Global-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the global level or query theinformation_schema.GLOBAL_VARIABLESview (in MySQL mode) for the variable at the global level.Session-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the session level or query theinformation_schema.SESSION_VARIABLESview (in MySQL mode) for the variable at the session level.
Modify the variable
Global-level operation
In the
systenant, you can directly change the value of the variable at the global level.In a MySQL user tenant, you must have the
SUPERorALTER SYSTEMprivilege to change the value of the variable at the global level.
Session-level operation
In the
systenant or a user tenant, you can directly change the value of the variable at the session level for the current tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 4K. The unit is byte. |
| Value range | [0, 0.75M]. The value 0 indicates that INROW storage is disabled. |
| Effective scope |
|
| Modifiable | Yes. You can use the SET or ALTER SESSION SET statement to modify the variable. |
Considerations
- If you do not specify
LOB_INROW_THRESHOLDwhen 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_THRESHOLDis not specified.
Examples
In the following example, LOB_INROW_THRESHOLD is not specified:
Set
ob_default_lob_inrow_thresholdto 40,960 bytes.Set the variable at the session level:
obclient> SET ob_default_lob_inrow_threshold = 40960;Set the variable at the global level:
obclient> SET GLOBAL ob_default_lob_inrow_threshold = 40960;
Create a table named
twithout specifyingLOB_INROW_THRESHOLD.obclient> CREATE TABLE t(pk int, data text);The value of
ob_default_lob_inrow_thresholdis used as the threshold. In this case, the INROW threshold of thettable is 40,960 bytes.