Note
This variable is avaiable starting with V4.4.2 BP1.
Description
json_float_full_precision specifies the precision mode for parsing JSON numbers.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement, or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLE(Oracle mode) orinformation_schema.GLOBAL_VARIABLES(MySQL mode) view to obtain the values of Global system variables.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement, or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLE(Oracle mode) orinformation_schema.SESSION_VARIABLES(MySQL mode) view to obtain the values of Session system variables.
Modify variables
Global level
systenant can modify the values of Global system variables.- MySQL user tenants need to have the
SUPERorALTER SYSTEMprivilege to modify the values of Global system variables. - Oracle user tenants need to have the
ALTER SYSTEMprivilege to modify the values of Global system variables.
Session level
systenant and all user tenants can modify the values of Session system variables in their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Boolean |
| Default value | False |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Use cases
json_float_full_precision is for compatibility with databases, such as PolarDB, that support similar options. Valid values:
True: specifies high precision. The parsing speed is slower.False: specifies low precision. The parsing speed is faster.
Examples
Session level
Use low precision to parse JSON numbers, which increases parsing speed.
obclient> SET json_float_full_precision = False;Use high precision to parse JSON numbers, which decreases parsing speed.
obclient> SET json_float_full_precision = True;
Global level
Use low precision to parse JSON numbers, which increases parsing speed.
obclient> SET GLOBAL json_float_full_precision = False;Use high precision to parse JSON numbers, which decreases parsing speed.
obclient> SET GLOBAL json_float_full_precision = True;
