ob_table_access_policy

2025-11-14 07:33:33  Updated

Note

This variable was introduced in V4.3.3.

Description

The ob_table_access_policy variable controls the optimizer to prioritize the selection of specific storage formats when generating a base table plan.

Privilege requirements

  • Query variables

    • Global level

      sys tenants and user tenants can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE (Oracle mode) and information_schema.GLOBAL_VARIABLES (MySQL mode) to query the value of a global system variable.

    • Session level

      sys tenants and user tenants can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_SESSION_VARIABLE (Oracle mode) and information_schema.SESSION_VARIABLES (MySQL mode) to query the value of a session system variable.

  • Modify variables

    • Global take effect

      • sys tenants can directly modify the value of a global system variable.

      • MySQL user tenants must have the SUPER or ALTER SYSTEM privilege to modify the value of a global system variable.

      • Oracle user tenants must have the ALTER SYSTEM privilege to modify the value of a global system variable.

    • Session take effect

      sys tenants and user tenants can directly modify the value of a session system variable in their own tenant.

Attributes

Attribute Description
Type Enum
Default value AUTO
Value range
  • ROW_STORE: Prioritizes row-based storage format.
  • COLUMN_STORE: Prioritizes column-based storage format.
  • AUTO: The optimizer automatically decides the storage format.
Effective scope
  • Global
  • Session
Modifiable Yes. You can use the SET statement to modify it.

Examples

The following examples show how to configure the optimizer to prioritize the selection of column-based storage format when generating a base table plan.

  • Session take effect

    obclient> SET ob_table_access_policy='COLUMN_STORE';
    
  • Global take effect

    obclient> SET GLOBAL ob_table_access_policy='COLUMN_STORE';
    

Contact Us