OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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.1.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    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.1.0
    iconOceanBase Database
    SQL - V 4.1.0
    SQL
    KV
    • V 4.6.0
    • 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:2023-07-28 02:55:43  Updated
    share
    What is on this page
    Syntax
    Parameters
    Considerations
    Examples

    folded

    share

    TheSET_CONSUMER_GROUP_MAPPING procedure adds, deletes, or modifies an entry that maps a session to a resource consumer group based on the logon and operating attributes of the 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. In the current database version, you can add or modify only the ORACLE_USER attribute which specifies the database username, the COLUMN attribute, and the ORACLE_FUNCTION attribute. Background tasks of OceanBase Database, such as major compactions, minor compactions, data backup, data restoration, and data completion, do not belong to user operations and may probably contend for the CPU and I/O resources of other users and tasks. Therefore, you can specify mappings between ORACLE_FUNCTION and different background tasks so that only the resources in the corresponding resource consumer group are available for the tasks.
    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 predefined mappings between the resource consumer group and the ORACLE_FUNCTION attribute in OceanBase Database. You can call the DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING procedure to modify or delete these mappings.

    Attribute
    Value
    Description
    ORACLE_FUNCTION COMPACTION_HIGH Corresponding to MINI_MERGE and DDL KV merge tasks.
    ORACLE_FUNCTION COMPACTION_MID Corresponding to MINOR_MERGE tasks.
    ORACLE_FUNCTION COMPACTION_LOW Corresponding to MAJOR_MERGE tasks.
    ORACLE_FUNCTION HA_HIGH Corresponding to replication, rebuild, and restoration tasks.
    ORACLE_FUNCTION HA_MID Corresponding to migration tasks.
    ORACLE_FUNCTION HA_LOW Corresponding to backup and backup cleanup tasks.
    ORACLE_FUNCTION DDL Corresponding to unique index verification, column deletion, and data completion operations.
    ORACLE_FUNCTION DDL_HIGH Corresponding to minor compactions for 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