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.3.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    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

    V$OB_MEMORY

    Last Updated:2026-04-09 02:53:56  Updated
    Share
    What is on this page
    Purpose
    Columns
    CTX_NAME values
    Correspondence between CTX_NAME and MOD_NAME
    Impact of common SQL operations on memory CTX
    References

    folded

    Share

    Note

    • This view was renamed from V$MEMORY to V$OB_MEMORY starting from V4.0.0.
    • This view is available only in MySQL mode. In Oracle mode, the query result is empty.

    Purpose

    This view displays the memory statistics of the current tenant on the current node.

    Columns

    Column
    Type
    Nullable?
    Description
    CON_ID NUMBER(38) NO The tenant ID.
    SVR_IP VARCHAR2(46) NO The IP address of the server.
    SVR_PORT NUMBER(38) NO The port number of the server.
    CTX_NAME VARCHAR2(256) NO The name of the CTX to which the memory belongs.
    MOD_NAME VARCHAR2(256) NO The name of the MOD to which the memory belongs.
    COUNT NUMBER NO The difference between the number of memory units allocated and freed. This value indicates the number of memory units currently used by the mod.
    HOLD NUMBER NO The size of memory currently occupied by the mod.
    USED NUMBER NO The size of memory currently used by the mod. Unit: Byte

    CTX_NAME values

    The following table describes the names and meanings of common memory CTXs.

    CTX_NAME
    Description
    DEFAULT_CTX_ID The ID of the memory context for unallocated memory.
    MEMSTORE_CTX_ID The ID of the memory context for user MemTable data.
    TRANS_CTX_MGR_ID The ID of the transaction context.
    PLAN_CACHE_CTX_ID The ID of the execution plan cache context.
    GLIBC The memory allocated by using the Glibc Malloc interface.
    CO_STACK The memory for the thread execution stack.
    KVSTORE_CACHE_ID The ID of the dynamic scalable cache.
    META_OBJ_CTX_ID The memory for storing metadata, such as macroblock metadata.
    TX_CALLBACK_CTX_ID The ID of the transaction callback context. This context is used to record partial modifications during transaction execution. When a transaction is committed or rolled back, the corresponding data can be found and operated on.
    LOB_CTX_ID The Allocator ID in the ObLobManager.
    PS_CACHE_CTX_ID The ID of the cache for the PREPARE stmt_name FROM preparable_stmt statement.
    TX_DATA_TABLE The transaction data table. It stores the status of resolved transactions and is used for dumping queries in scenarios such as uncommitted transactions and FAST COMMIT.
    MDS_DATA_ID The ID of the memory for multi-source data.
    LIBEASY The memory of the network framework (EASY).
    LOGGER_CTX_ID The ID of the program log memory context.
    RPC_CTX_ID The ID of the RPC framework memory context.
    PKT_NIO The memory of the network framework (pkt_nio).
    SCHEMA_SERVICE The memory for storing schema metadata, such as tables and databases.

    Correspondence between CTX_NAME and MOD_NAME

    The following table lists the correspondence between CTX_NAME and MOD_NAME:

    CTX_NAME
    MOD_NAME
    TENANT
    DEFAULT_CTX_ID
    • MysqlRequesReco: MySQL request record module
    • LogAggreBuffer: Log aggregation buffer module
    • PartitLogServic: Partition log service module
    • SqlDtl: SQL detail module
    • TransAudit: Transaction audit module
    • IoControl: Input/output control module
    • ResultSet: Query result set module
    ALL
    • SchemaSysCache: System-level cache module for caching schema information
    • SeArray: Sortable array module
    • SstaMicrBlocAll: Statistics, microblock, and other modules
    • CsSstableReader: Compressed table reader
    • TmpBlockManager: Temporary block manager
    • TenantSchemMgr: Tenant schema manager
    • DecoderCtx: Decoder context
    • SqlSqcHandler: SQL semantic processor
    500
    SQL_EXEC_CTX_ID
    • CostBasedRewrit: Cost-based rewrite optimizer
    • SqlExecutor: SQL executor
    • SqlPsCache: SQL parameter cache module
    • OB_SQL_AGGR_FUNC_ROW: SQL aggregate function row object
    ALL
    WORK_AREA
    • SqlAggrFuncRow: SQL aggregate function row object
    • WindowAggProc: Window aggregation processing module
    • SqLWindoRowStor: Module for storing window rows
    • SqLChunkRowStor: Module for storing block rows
    • SqLTempTabLeRow: Module for storing temporary table rows
    • ConnectByPump: Data transmission module for connection operations
    • SqlSortRow: Sorting row module
    • SortOpRows: Collection of sorted row objects
    • SqLHashDisRowSt: Hash distribution row storage module
    • SqLHashDist: Hash distribution module
    • HashNodeGrouRow: Module for hash node grouping rows
    • HashDistinctOp: Hash deduplication operation module
    • ArenaHashJoin: Memory space management module for hash join operations
    • HtOpAlloc: Hash table operation allocation module
    PLAN_CACHE_CTX_ID
    • OB_SQLSTAT_OBJ: Cache for recording SQL execution statistics
    • OB_SQL_PHY_PLAN: Query plan module
    • OB_SQL_PLAN_CACHE: Query plan cache module
    • OB_SQL_PHY_PL_OBJ: Query plan object module
    • PRE_CALC_EXPR: Module for precomputed expressions
    TRANS_CTX_MGR_ID
    • PartTranCtxMgr: Partition transaction context
    • TenantCtxAlloca: Tenant allocation context
    TX_CALLBACK_CTX_ID MemtableCallbac: Module for memory table callbacks
    REPLAY_STATUS_CTX_ID ReplayStatus: Module for replay status
    CO_STACK CO_STACK: Coroutine stack module 500
    STORAGE_LONG_TERM_META_CTX_ID
    • Partition: Partition object
    • PartitioStore: Partition storage module
    • PartitioStorage: Partition storage
    STORAGE_SHORT_TERM_META_CTX_ID
    • Sstable: SSTable table
    • SstableMeta: Meta tenant SSTable table
    • MemtableObject: Memory table object
    ALL OB_COMMON_ARRAY: OceanBase common array ALL

    Impact of common SQL operations on memory CTX

    In OceanBase Database, each SQL execution or operation corresponds to a specific CTX. The size of the data and the complexity of the operation can lead to an increase in memory usage for the CTX. The following are some common SQL operations that may cause an increase in memory usage for certain CTXs:

    • Sorting large amounts of data (ORDER BY, GROUP BY, etc.): Sorting operations require loading data into memory for sorting, which may increase the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Aggregating large amounts of data (SUM, AVG, MAX, MIN, etc.): Aggregation operations require loading data into memory for calculations, which may increase the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Joining large amounts of data (JOIN): Join operations require loading data into memory for matching, which may increase the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Querying large amounts of data (SELECT): Query operations require loading data into memory for filtering and sorting, which may increase the memory usage of PLAN_CACHE_CTX_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Writing large amounts of data (INSERT, UPDATE, DELETE, etc.): Write operations require managing and processing transactions, which may increase the memory usage of TRANS_CTX_MGR_ID, MEMSTORE_CTX_ID, and DEFAULT_CTX_ID.

    • Logging large amounts of data (REDO, UNDO, BINLOG, etc.): Logging operations require loading data into memory for operations, which may increase the memory usage of TRANS_CTX_MGR_ID, DEFAULT_CTX_ID, LOB_CTX_ID, and TX_DATA_TABLE.

    References

    • View memory usage information
    • Common memory issues

    Previous topic

    V$INSTANCE
    Last

    Next topic

    V$OB_MEMSTORE
    Next
    What is on this page
    Purpose
    Columns
    CTX_NAME values
    Correspondence between CTX_NAME and MOD_NAME
    Impact of common SQL operations on memory CTX
    References