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.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 & 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.0
    iconOceanBase Database
    SQL - V 4.3.0
    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

    V$OB_MEMORY

    Last Updated:2026-04-15 08:30:02  Updated
    share
    What is on this page
    Purpose
    Columns
    Values of the CTX_NAME column
    Mappings between CTX_NAME and MOD_NAME
    Impact of common SQL operations on the memory context
    References

    folded

    share

    Note

    The view name is changed from V$MEMORY to V$OB_MEMORY since OceanBase Database V4.0.0.

    Purpose

    The V$OB_MEMORY view displays the memory statistics of the current tenant on all nodes.

    Columns

    Column Type Nullable? Description
    TENANT_ID bigint(20) NO The ID of the tenant.
    SVR_IP varchar(46) NO The IP address of the server.
    SVR_PORT bigint(20) NO The port number of the server.
    CTX_NAME varchar(256) NO The name of the context to which the memory belongs.
    MOD_NAME varchar(256) NO The name of the module to which the memory belongs.
    COUNT decimal(20,0) NO The difference between memory spaces that are allocated and released, which is the number of memory units used by the module.
    HOLD decimal(20,0) NO The size of memory currently occupied by the module.
    USED decimal(20,0) NO The size in bytes of memory being used by the module.

    Values of the CTX_NAME column

    The following table describes the common memory context names.

    CTX_NAME Description
    DEFAULT_CTX_ID The context ID of unallocated memory.
    MEMSTORE_CTX_ID The MemTable data context ID.
    TRANS_CTX_MGR_ID The transaction context ID.
    PLAN_CACHE_CTX_ID The context ID of the plan cache.
    GLIBC The memory applied for by using the Glibc Malloc API.
    CO_STACK The memory for the execution stack of threads.
    KVSTORE_CACHE_ID The ID of the auto-scaling cache.
    META_OBJ_CTX_ID The memory that stores metadata, such as metadata of macroblocks.
    TX_CALLBACK_CTX_ID The ID of the transaction callback context. This context records some modifications made during transaction execution so that the required data can be located when the transaction is committed or rolled back.
    LOB_CTX_ID The allocator ID in ObLobManager.
    PS_CACHE_CTX_ID The cache ID of the PREPARE stmt_name FROM preparable_stmt statement.
    TX_DATA_TABLE The transaction data table. This table stores the status of committed or rolled back transactions and is used in scenarios such as minor compaction of status information of uncommitted transactions and fast commits.
    MDS_DATA_ID The memory ID of multi-source data.
    LIBEASY The network framework memory (EASY).
    LOGGER_CTX_ID The context ID of the memory for application logs.
    RPC_CTX_ID The context ID of the memory for the RPC framework.
    PKT_NIO The network framework memory (pkt_nio).
    SCHEMA_SERVICE The memory for schema metadata, such as tables and databases.

    Mappings between CTX_NAME and MOD_NAME

    The following table lists the mappings between CTX_NAME and MOD_NAME.

    CTX_NAME MOD_NAME TENANT
    DEFAULT_CTX_ID
    • MysqlRequesReco: the module for recording MySQL requests.
    • LogAggreBuffer: the buffer module for log aggregation.
    • PartitLogServic: the partition log service module.
    • SqlDtl: the SQL details module.
    • TransAudit: the transaction audit module.
    • IoControl: the input/output control module.
    • ResultSet: the module where result sets are located.
    ALL
    • SchemaSysCache: the system-level cache module that caches mode information.
    • SeArray: the array sorting module.
    • SstaMicrBlocAll: the module for storing statistics and microblocks.
    • CsSstableReader: the compressed table reader.
    • TmpBlockManager: the temporary block manager.
    • TenantSchemMgr: the tenant mode manager.
    • DecoderCtx: the decoder context.
    • SqlSqcHandler: the SQL semantics handler.
    500
    SQL_EXEC_CTX_ID
    • CostBasedRewrit: the cost-based rewrite optimizer.
    • SqlExecutor: the SQL executor.
    • SqlPsCache: the SQL parameter cache module.
    • OB_SQL_AGGR_FUNC_ROW: a row object for SQL aggregate functions.
    ALL
    WORK_AREA
    • SqlAggrFuncRow: a row object for SQL aggregate functions.
    • WindowAggProc: the window aggregation processing module.
    • SqLWindoRowStor: the module related to rows in the storage window.
    • SqLChunkRowStor: the module related to rows in storage blocks.
    • SqLTempTabLeRow: the module related to rows in temporary tables.
    • ConnectByPump: the data transmission module for connections.
    • SqlSortRow: the row sorting module.
    • SortOpRows: the row object collection sorting module.
    • SqLHashDisRowSt: the module for storing hash-distributed rows.
    • SqLHashDist: the hash distribution module.
    • HashNodeGrouRow: the grouping and row dividing module for hash nodes.
    • HashDistinctOp: the hash deduplication module.
    • ArenaHashJoin: the memory space management module for hash joins.
    • HtOpAlloc: the hash table operation allocation module.
    PLAN_CACHE_CTX_ID
    • OB_SQL_PHY_PLAN: the execution plan module.
    • OB_SQL_PLAN_CACHE: the module that caches execution plans.
    • OB_SQL_PHY_PL_OBJ: the execution plan object module.
    • PRE_CALC_EXPR: the module related to precomputation expressions.
    TRANS_CTX_MGR_ID
    • PartTranCtxMgr: the partition transaction context.
    • TenantCtxAlloca: the tenant allocation context.
    TX_CALLBACK_CTX_ID MemtableCallbac: the module related to callbacks of memory tables.
    REPLAY_STATUS_CTX_ID ReplayStatus: the module related to the replay status.
    CO_STACK CO_STACK: the module related to the coroutine stack. 500
    STORAGE_LONG_TERM_META_CTX_ID
    • Partition: a partition object.
    • PartitioStore: the partition store module.
    • PartitioStorage: the partition storage.
    STORAGE_SHORT_TERM_META_CTX_ID
    • Sstable: an SSTable.
    • SstableMeta: the SSTable of a meta tenant.
    • MemtableObject: the memory table object.
    ALL OB_COMMON_ARRAY: the common array in OceanBase Database. ALL

    Impact of common SQL operations on the memory context

    In OceanBase Database, each SQL execution or operation corresponds to a context. The memory usage varies based on the memory context used, depending on the data volume and operation complexity. The following general SQL executions or operations may cause the increase in memory usage of some contexts.

    • Sorting of a large amount of data by using the ORDER BY or GROUP BY clause: A sorting operation needs to load the data to the memory for sorting. This may cause an increase in the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Aggregation of a large amount of data by using the SUM, AVG, MAX, or MIN function: An aggregation operation needs to load the data to the memory for computing. This may cause an increase in the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Join of a large amount of data by using JOIN operations: A join operation needs to load the data to the memory for matching. This may cause an increase in the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Query of a large amount of data by using the SELECT statement: A query operation needs to load the data to the memory for filtering and sorting. This may cause an increase in the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Write of a large amount of data by using the INSERT, UPDATE, or DELETE statement: A write operation requires transaction management and processing. This may cause an increase in the memory usage of TRANS_CTX_MGR_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Logging of a large amount of data into the redo log, undo log, or binlog: A logging operation needs to load the data to the memory. This may cause an increase in the memory usage of TRANS_CTX_MGR_ID, DEFAULT_CTX_ID, LOB_CTX_ID, and TX_DATA_TABLE.

    References

    • View memory usage information
    • FAQ

    Previous topic

    V$SYSTEM_EVENT
    Last

    Next topic

    V$OB_MEMSTORE
    Next
    What is on this page
    Purpose
    Columns
    Values of the CTX_NAME column
    Mappings between CTX_NAME and MOD_NAME
    Impact of common SQL operations on the memory context
    References