OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Assessment

V5.0.0Enterprise Edition
  • What's New
  • Product Introduction
    • Overview
    • Application scenarios
  • Install OMA
  • Compatibility assessment
    • Overview
    • System architecture
    • Product form
    • Object and Metadata Assessment
    • Assess SQL statement compatibility
    • Sybase ASE assessment
    • Custom rules
    • Database assessment
      • Overview of Database Assessment
      • Assess an Oracle database
      • Assess a MySQL database
      • Assess a TiDB database
      • Assess a PostgreSQL database
    • SQL execution verification
    • Mapper Scan Audit
    • Special Identification and Declaration Association
  • Performance assessment
    • Standalone edition
      • Overview
      • System architecture
      • Product form
      • Assess the performance difference between an Oracle database and an OceanBase database
      • Assess the performance differences between a MySQL database and an OceanBase database
      • Assess the performance differences between different versions of OceanBase Database
      • Log parsing
      • Replay execution
      • Performance statistics and reports
  • Release Notes
    • OMA V5.0.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Assessment
  3. V5.0.0

Assess the performance differences between different versions of OceanBase Database

Last Updated:2026-11-27 06:14:19

Log acquisition
Replay comparison
Procedure

Replay from an OceanBase database of the source version to that of the target version is used to verify whether the performance before and after an upgrade meets the expectation. This topic describes how to obtain logs, how to perform two types of replay comparisons, and how the parameters for the old version's replay correspond to those in the current command line. For parameter details, see Replay execution. For statistical fields, see Performance statistics and reports.

Log acquisition

There are two methods: reading files or directly connecting to the source to collect data using plugins.

Method
-f value
Input
Export files from audit views OCEANBASE_SQL_AUDIT_CSV Query and export audit views within a time window yourself. Supports .csv and .gz.csv formats.
Direct connection to audit views for collection OCEANBASE_SQL_AUDIT The plugin connects to the source via JDBC and polls audit views within a time window.
Cloud OceanBase audit logs OCEANBASE_SLS Files exported by the log service. The built-in format does not require a plugin.
Old OMA export files OMA_DUMP_JSON Directory of historical dump outputs

Parameters for direct connection collection are specified in the options.sqlAudit configuration file. Pass them using -c <configuration_file>:

Field
Required
Description
host and port Yes The IP address and port of the source.
username Yes The username of the source. Must have read access to the SQL audit view.
password Not mandatory Actual connection is provided according to the source authentication configuration.
tenantMode Yes mysql or oracle, in lowercase. Other values result in sqlAudit.tenantMode must be 'mysql' or 'oracle'.
version Yes 3.x or 4.x. Other values result in sqlAudit.version must be '3.x' or '4.x'.
startTime and endTime Yes The collection time window, which must be written as a time zone-adjusted ISO offset, e.g., 2026-11-12T17:00:00+08:00. endTime is the polling watermark, set to a point in the future that will always be polled.
database Yes The database used for the collection connection. Generally fill in oceanbase. If missing, it reports No database selected.
tenant No The source tenant. Choose either this or username: specifying this field when username is already written as root@tenant results in Access denied.
targetTenant No Does not participate in generating filter conditions, only serves as an identifier; use whereClause to scope records by tenant.
whereClause No Additional filter conditions for range queries.
batchSize and pollIntervalMillis No Number of rows per batch and polling interval. Default is 5000 and 10000.
connectRetry and queryTimeoutSeconds No Number of connection retries and query timeout.

Missing required fields will sequentially report sqlAudit.<field_name> is required. version only determines which view to query (4.x corresponds to gv$ob_sql_audit, 3.x corresponds to gv$sql_audit). It does not detect the actual cluster version; fill in based on the view present at the source. Collection behavior and considerations are described in "Direct connection to source collection" under Log analysis.

The collection window is controlled on the export side or in options.sqlAudit: collect records only during business peak hours, or for a specified tenant or database. On the replay side, --start-time can be used to filter by a lower time boundary.

Replay comparison

Single-replay comparison: Use audit logs from the old version as input to replay to a tenant of the new version. In the report, the source_* column shows the time consumed by the old version as recorded in the logs, and the target_* column shows the measured time consumed by the new version. This method is convenient but is subject to cache, data volume, and concurrency effects since the data comes from runs at different times. It is suitable only for preliminary screening.

Double-replay comparison: Use the same CANONICAL_JSONL event catalog to replay to two tenants, one before and one after the upgrade. Generate independent statistical files for each replay, then compare the target_* columns of the two results. Fewer control variables yield a more reliable conclusion:

Must be consistent
Description
Event catalog Use exactly the same parsed output for both replays. Do not parse again.
Data Same table structure and data scale, same data refresh method.
Tenant specifications Same unit specifications, local and remote deployment configurations.
Concurrency and timing Same replay.replayerCount, replay.replayMode, and replay.bufSize.
Filter scope Same filters and sqlKeywordFilter configurations.
Statistics and checkpoints Use a separate stats.dir for each replay and clear or replace the checkpoint. In practice, the execution directory's checkpoint.json file is read for continuation. Using the same checkpoint skips completed shards. See "Shards and continuation" in Replay execution.

Procedure

  1. Parse the exported audit logs. For direct connection collection, use -c <configuration_file> to provide options.sqlAudit; -s is not needed.

    java -Xmx2g -jar oma.jar analyze \
      -f OCEANBASE_SQL_AUDIT_CSV --plugins-dir ./plugins \
      -s ./logs/ob-audit -o ./work/ob-canonical \
      --source-type oceanbase --shards 4 --max-threads 4
    
  2. Configure the settings according to the target tenant mode. Use tenantMode as MYSQL for MySQL mode and ORACLE for Oracle mode. When comparing the two replays, modify only the database group, stats.dir, and checkpoint.filePath.

  3. Replay to the tenants of the two versions in sequence, confirming the consistency of the logs step by step. The confirmation method is the "Replay reconciliation" report and the number of submitted records in the summary: both replays should complete normally (status of replay_run_metadata is COMPLETED). Otherwise, the number of iterations and percentiles are not comparable.

  4. Generate reports separately and compare the target_* percentiles. By default, the report outputs the top N by SQL ID. Sort fields are specified using --order-by. To view statistics at the statement text level, check the SQL original statistics or export the entire table for manual aggregation.

    java -Xmx2g -jar oma.jar replay --report ./work/stats/stats-before.db \
      --order-by target_p90_ms --top 50 --format csv --output before.csv
    

    To re-aggregate by database, tenant, or user, use --export-sql-id-global-csv <path> to export the sql_id_global_stats table and continue the calculation on it.

Previous topic

Assess the performance differences between a MySQL database and an OceanBase database
Last

Next topic

Log parsing
Next
on this page
Log acquisition
Replay comparison
Procedure