Note
This variable is available starting with V4.2.1 BP2.
Description
The ob_default_lob_inrow_threshold variable specifies the default inline storage threshold for LOB fields when a table is created.
Scope of application
This variable is available for OceanBase Database in the MySQL mode only.
Privilege requirements
Query variables
Global level
In MySQL mode, you can query the value of a global system variable by using the
SHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview in thesystenant or a user tenant.Session level
You can execute the
SHOW VARIABLESstatement or query theinformation_schema.SESSION_VARIABLESview (MySQL mode) in thesystenant and all user tenants to obtain the values of Session system variables.
Modify variables
Global level
The
systenant can modify the value of a global system variable.To modify the value of a global system variable, a MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege.
Session level
In the
systenant and all user tenants, you can directly modify the Session system variables of the current tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 8192 B
NoteThe value of this variable is changed from 4096 to 8192 in V4.3.2. |
| Value range | The value of the range is [0, 0.75M]. A value of 0 indicates that INROW is disabled. |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement or the ALTER SESSION SET statement to modify the value. |
Description
ob_default_lob_inrow_threshold is a global-level system variable. It determines the value of the table-level lob_inrow_threshold attribute of newly created tables (existing tables are not affected). Changing the ob_default_lob_inrow_threshold variable will affect the LOB column in-row or out-of-row storage threshold of newly created tables. Changing the lob_inrow_threshold attribute will affect the in-row or out-of-row storage of the table. If the lob_inrow_threshold is not specified when creating a table, the value of ob_default_lob_inrow_threshold will be used as the threshold for in-row or out-of-row storage of LOB columns in the table.
Examples
An example of a query without the LOB_INROW_THRESHOLD clause is shown below:
Set the value of
ob_default_lob_inrow_thresholdto 40960 bytes.Session level
obclient> SET ob_default_lob_inrow_threshold = 40960;Global level
obclient> SET GLOBAL ob_default_lob_inrow_threshold = 40960;
Create the
ttable without specifying theLOB_INROW_THRESHOLDparameter.obclient> CREATE TABLE t(pk int, data text);The system variable
ob_default_lob_inrow_thresholdis used as the threshold. The inline threshold for thettable is set to 40960 bytes.
