Overview
ob_default_lob_inrow_threshold specifies the default threshold for in-row storage of LOB fields during table creation.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview 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 to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
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 | 8192, in bytes |
| Value range | A value of [0, 0.75M] for this parameter is 0, which prohibits INROW. |
| Effective Scope |
|
| Modifiable | Yes, you can use the following methods:SETorALTER SESSION SETStatement modification. |
Usage instructions
ob_default_lob_inrow_threshold is a global system variable that actually affects the value of the table-level attribute lob_inrow_threshold for newly created tables (existing tables are not affected). Modifying the system variable ob_default_lob_inrow_threshold affects the in-row and out-of-row storage threshold for LOB columns in newly created tables. Modifying the table-level attribute lob_inrow_threshold affects the in-row and out-of-row storage for that table. If lob_inrow_threshold is not specified when creating a table, the value of the system variable ob_default_lob_inrow_threshold is used as the threshold for in-row and out-of-row storage of LOB columns in that table.
Configuration example
An example where LOB_INROW_THRESHOLD is not specified is as follows:
Set the value of
ob_default_lob_inrow_thresholdto 40960 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.