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

    Overview

    Last Updated:2026-04-15 08:30:01  Updated
    share
    What is on this page
    About WR
    Features
    Related views
    References

    folded

    share

    Workload Repository (WR) periodically collects data from performance views of OceanBase Database to help you analyze performance issues.

    About WR

    WR periodically collects data from related views of OceanBase Database, records the system status, and provides views for querying database performance information. WR can automatically collect data and retain historical performance data for performance monitoring and management. You can use the DBMS_WORKLOAD_REPOSITORY package to adjust WR configurations. For example, you can enable snapshots periodically, configure the snapshot period, and delete snapshots.

    Features

    WR periodically records performance data of OceanBase Database. Therefore, you can use WR to trace back the historical performance records of OceanBase Database and analyze the performance issues within a specific period. WR provides the following features:

    • Automatic data collection: WR periodically collects data from specified performance views, such as V$ACTIVE_SESSION_HISTORY, V$SYSSTAT, and V$STATNAME, processes the data, and then inserts the data into internal tables of the meta tenant. After a cluster is deployed, WR automatically creates snapshots. You can also modify the time of the snapshot timer to manually schedule snapshot creation. By default, WR collects snapshots on an hourly basis.

    • Data persistence and cleanup: Collected data is persisted to the disk for retention. WR regularly deletes expired data to avoid occupying excessive storage space. Generally, a deletion operation is triggered every day after a major compaction is completed. By default, snapshot data that has been stored for more than seven days is considered expired.

    • Snapshot collection and deletion: WR provides a database management system (DBMS) package for you to manually initiate a collection task by using PL or SQL, or to delete specified WR snapshots.

    • Collection frequency adjustment: With the DBMS package, you can modify the time interval of the timer thread to adjust the snapshot collection frequency for WR.

    • Low overhead and load: WR consumes a few resources and produces a low overhead during running. Therefore, the system performance is not affected.

    • Time model collection: The DB time consumed by all sessions in the database is updated every second. The DB time is a cumulative value calculated by using the following formula: DB time = elapse time - idle wait time = cpu time + non-idle wait time.

      Note

      In the DB time calculation formula:

      • elapse time is the elapsed time from the start of the operation to the present time.
      • idle wait time is the idle wait time of the session.
      • cpu time is the CPU execution time.
      • non-idle wait time is the non-idle wait time of the session.

    Related views

    WR periodically collects data from the following views of OceanBase Database:

    • [G]V$SYSSTAT: displays system statistics that are most widely used and represent the running status of the database.

    • V$STATNAME: displays system metrics that can reflect the running status of the database.

    • [G]V$ACTIVE_SESSION_HISTORY: displays information about active sessions, which are sampled every second, and records the system running status based on time. WR persists the data at a sampling rate of 10:1.

    WR will support more performance views in later versions to display details about database performance, resource utilization, and other key metrics.

    References

    • Manage WR
    • Monitor historical session performance
    • Clean up WR data

    Previous topic

    Monitor host performance
    Last

    Next topic

    Manage WR
    Next
    What is on this page
    About WR
    Features
    Related views
    References