OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.3

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.3
    iconOceanBase Database
    SQL - V 4.3.3
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    SET_CONSUMER_GROUP_MAPPING

    Last Updated:2024-12-02 03:48:27  Updated
    share
    What is on this page
    Syntax
    Parameters
    Considerations
    Examples

    folded

    share

    The SET_CONSUMER_GROUP_MAPPING procedure adds, deletes, or modifies an entry that maps the session to a resource consumer group based on the login and operating attributes of a session.

    Applicability

    This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.

    Syntax

    DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(
        attribute        IN VARCHAR2,
        value            IN VARCHAR2,
        consumer_group   IN VARCHAR2 DEFAULT NULL);
    

    Parameters

    Parameter Description
    attribute The attribute to be added or modified. OceanBase Database of this version supports only ORACLE_USER (database username), COLUMN, and ORACLE_FUNCTION. OceanBase Database executes certain tasks, such as major and minor compaction, backup and recovery, and data completion in the background. Such tasks are not in the scope of user tasks and may cause the contention of CPU and I/O resources. Therefore, OceanBase Database provides the FUNCTION attribute for you to specify mappings between background tasks and resource groups, so that the tasks can use only resources in the mapped resource groups.
    value The attribute value, which contains the absolute mapping and a regular expression.
    consumer_group The name of the mapped-to resource consumer group. If you set the value to NULL, the mapping will be deleted.

    Considerations

    If no mapping exists between the specified attribute and value, a mapping to the specified resource consumer group will be created. If a mapping exists between the specified attribute and value, the mapped-to resource consumer group will be updated to the specified consumer group. If the consumer_group parameter is set to NULL, any mapping between the specified attribute and value will be deleted.

    The following table describes the resource group mapping rules predefined for the ORACLE_FUNCTION attribute in OceanBase Database. You can use the DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING procedure to modify or delete these mapping rules.

    Attribute Value Description
    ORACLE_FUNCTION COMPACTION_HIGH Corresponds to MINI_MERGE and DDL KV merge tasks.
    ORACLE_FUNCTION COMPACTION_MID Corresponds to MINOR_MERGE tasks.
    ORACLE_FUNCTION COMPACTION_LOW Corresponds to MAJOR_MERGE tasks.
    ORACLE_FUNCTION HA_HIGH Corresponds to copy, rebuild, and restore tasks.
    ORACLE_FUNCTION HA_MID Corresponds to migration tasks.
    ORACLE_FUNCTION HA_LOW Corresponds to backup and backup cleanup tasks.
    ORACLE_FUNCTION DDL Corresponds to unique index verification, column dropping, and data completion tasks.
    ORACLE_FUNCTION DDL_HIGH Corresponds to minor compaction tasks of DDL MemTables.

    Examples

    obclient> CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(
          attribute        => 'COLUMN' ,
          value            => 't2.c3 = 3 for user1',
          consumer_group   => 'group1');
    Query OK, 0 rows affected
    

    Previous topic

    DELETE_PLAN_DIRECTIVE
    Last

    Next topic

    UPDATE_PLAN_DIRECTIVE
    Next
    What is on this page
    Syntax
    Parameters
    Considerations
    Examples