Note
This variable was introduced in V4.2.1 BP2.
Description
The ob_default_lob_inrow_threshold variable specifies the default row-based storage threshold for LOB fields when a table is created.
Applicability
This variable applies only to OceanBase Database in MySQL mode.
Privilege requirements
Query a variable
Global level
systenants and user tenants can execute theSHOW VARIABLESstatement or view theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to query the value of a global system variable.Session level
systenants and user tenants can execute theSHOW VARIABLESstatement or view theinformation_schema.SESSION_VARIABLESview (MySQL mode) to query the value of a session system variable.
Modify a variable
Global level
systenants can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenants and user tenants can directly modify the value of a session system variable in their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 8192, in bytes
NoteThe default value of this variable was changed from 4096 to 8192 in V4.3.2. |
| Value range | [0, 0.75M] If the value is 0, INROW is disabled. |
| Scope |
|
| Modifiable | Yes. You can execute the SET or ALTER SESSION SET statement to modify the value. |
Considerations
ob_default_lob_inrow_threshold is a global-level system variable that actually affects the table-level attribute lob_inrow_threshold of newly created tables (existing tables are not affected). Modifying the system variable ob_default_lob_inrow_threshold will impact the in-row and out-of-row storage threshold for LOB columns in newly created tables, while modifying the table-level attribute lob_inrow_threshold will affect the in-row and out-of-row storage for that specific table. If lob_inrow_threshold is not specified when creating a table, the value of the system variable ob_default_lob_inrow_threshold will be used as the threshold for in-row and out-of-row storage of LOB columns in that table.
Examples
The following examples show how to set the value of ob_default_lob_inrow_threshold without specifying LOB_INROW_THRESHOLD:
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 a table named
twithout specifyingLOB_INROW_THRESHOLD.obclient> CREATE TABLE t(pk int, data text);In this case, the value of the
ob_default_lob_inrow_thresholdvariable is used as the INROW threshold for thettable, which is 40960 bytes.