Note
This variable is available starting with V4.2.1 BP2.
Overview
ob_default_lob_inrow_threshold specifies the default threshold for storing LOB fields within rows during table creation.
Applicability
This variable applies only to the MySQL-compatible mode of OceanBase Database.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview (in MySQL-compatible mode) to view the values of global system variables.Session level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview (in MySQL-compatible mode) to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 4K, in bytes |
| Value range | A value of [0, 0.75M] set to 0 indicates that INROW is disabled. |
| Effective Scope |
|
| Modifiable | Yes, you can use the following methods:SETorALTER SESSION SETThe statement can be modified later. |
Usage instructions
- If
LOB_INROW_THRESHOLDis not specified when creating a table, the value of this variable will be written into the table schema. - Modifying the value of this variable does not affect the INROW threshold for tables that have already been created. It only affects newly created tables that do not specify
LOB_INROW_THRESHOLD.
Configuration example
An example where LOB_INROW_THRESHOLD is not specified is as follows:
Set the value of
ob_default_lob_inrow_thresholdto 40,960 bytes.Settings at the session level
obclient> SET ob_default_lob_inrow_threshold = 40960;Settings at the global level
obclient> SET GLOBAL ob_default_lob_inrow_threshold = 40960;
Create table
twithout specifyingLOB_INROW_THRESHOLD.obclient> CREATE TABLE t(pk int, data text);In this case, the value of the system variable
ob_default_lob_inrow_thresholdis used as the threshold. That is, the INROW threshold for tabletis 40,960 bytes.
