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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service

Connectors and Middleware

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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Developer Center

V4.1.3Enterprise Edition
  • Document Overview
  • Overview
    • What is ODC?
    • Benefits
    • Architecture
    • Features
    • Limits
  • Quick Start
    • Overview
    • Install ODC
    • Log on to ODC with an account
    • Create a private connection
  • Tutorials
    • Tips on the SQL Console
    • Create a connection
    • Export data
    • Import data
    • Debug a stored procedure
    • View the performance of an SQL statement
  • User Guide (Web ODC)
    • Log on to ODC
      • Log on to ODC with an account
      • Change the password
    • ODC homepage
    • Connect to a database
      • Create a private connection
      • Manage private connections
    • Public resource management
      • Overview
      • Quick start
      • Resource permissions
        • Manage public connections
        • Manage resource groups
        • Manage roles
        • Manage users
        • Automatic authorization rules
      • Task process management
      • Manage operation records
      • Data desensitization management
      • System settings
    • Use the workspace
      • Overview
      • SQL window
      • Anonymous block window
      • Command-line window
      • Stored scripts
      • Snippet
    • Use tools
      • Data export and import
        • Overview
        • Export and import formats
        • Batch export and import
        • Single table export and import
      • Data mocking
      • Partitioning plan
      • Database changes
      • Shadow table synchronization
      • SQL plan
    • Recycle bin
    • View operation records
    • Task management
      • Overview
      • Import tasks
      • Export tasks
      • Data mocking tasks
      • Database change tasks
      • Partitioning plan task
      • Permission application tasks
      • Shadow table synchronization tasks
      • SQL plan task
    • Session management
    • Database objects
      • Table objects
        • Overview
        • Create a table
        • Table list
        • Manage table attributes
        • Manage table data
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
    • Help center
  • User Guide (Client ODC)
    • Install ODC
    • ODC homepage
    • Connect to a database
      • Create a private connection
      • Manage connections
    • Use the workspace
      • Overview
      • SQL window
      • Anonymous block window
      • Command-line window
      • Stored scripts
      • Snippet
    • Use tools
      • Data export and import
        • Overview
        • Export and import formats
        • Batch export and import
        • Single table export and import
      • Data mocking
      • Asynchronous execution
      • Shadow table synchronization
    • Recycle bin
    • View operation records
    • Task management
      • Overview
      • Import tasks
      • Export tasks
      • Data mocking tasks
      • Database Change
      • Shadow table synchronization tasks
    • Session management
    • Database objects
      • Table objects
        • Overview
        • Create a table
        • Table list
        • Manage table attributes
        • Manage table data
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
    • Help center
  • Deployment Guide
    • Deployment overview
    • Preparations before deployment
    • Deploy a single ODC node
      • Deployment process
      • Load and run an ODC image
    • Deploy ODC in high availability mode
      • Deployment process
      • Load and run an ODC image
      • Deploy SSL certificate
      • Deploy the NGINX proxy
      • Configure certificate trust
    • Deployment verification
  • Upgrade Guide
    • Overview
    • Preparations before upgrade
    • Upgrade single-node ODC
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
    • Upgrade high-availability
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
      • Upgrade NGINX image
    • Upgrade verification
    • Rollback after upgrade failed
  • FAQ
  • Release Note
    • V4.1
      • ODC V4.1.3
      • ODC V4.1.1
      • ODC V4.1.2
      • ODC V4.1.0
    • V4.0
      • ODC V4.0.2
      • ODC V4.0.0
    • V3.4
      • ODC V3.4.0
    • V3.3
      • ODC V3.3.3
      • ODC V3.3.2
      • ODC V3.3.1
      • ODC V3.3.0
    • V3.2
      • ODC V3.2.3
      • ODC V3.2.2
      • ODC V3.2.1
      • ODC V3.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Developer Center
  3. V4.1.3

View the performance of an SQL statement

Last Updated:2026-09-04 08:15:22

Background information
Prerequisites
Procedure

This topic describes how to view the performance of an SQL statement in OceanBase Developer Center (ODC).

Background information

SQL is a database language that provides multiple features such as data manipulation and data definition. Most database developers manage and develop database content by using SQL statements. Therefore, the performance of SQL statements affects the performance of the database. SQL provides the EXPLAIN command, which allows you to view the specific steps for executing an SQL statement in the database. You can judge and improve the performance of the SQL statement based on the execution steps.

As a powerful enterprise-level database development platform, ODC provides a graphical user interface (GUI) for you to view the execution plans of SQL statements. ODC allows you to directly and conveniently view the execution status and analyze the performance of SQL statements.

Prerequisites

A sample table named "employees" has been created by running the following statement:

CREATE TABLE employees(
    emp_id INTEGER,
    emp_name VARCHAR(20),
    manager_id INTEGER
);

INSERT INTO employees VALUES ( 1, 'Anna', 6 ) ;
INSERT INTO employees VALUES ( 2, 'Brain', 4 ) ;
INSERT INTO employees VALUES ( 3, 'Candy', 4 ) ;
INSERT INTO employees VALUES ( 4, 'David', 5 ) ;
INSERT INTO employees VALUES ( 5, 'Eva', NULL) ;
INSERT INTO employees VALUES ( 6, 'Frank', 5 ) ;
INSERT INTO employees VALUES ( 7, 'Gary', 6 ) ;

Procedure

  1. After you enter the connection, enter the following SELECT statement in the editing area of the SQL window to view the data in the table named "employees":

    SELECT * FROM employees;
    
  1. Click Plan in the toolbar in the editing area.

    Before you run the statements, you can click Plan to view the estimated execution plan of the SQL statement selected or where the cursor is located in the current editing area. The estimated execution plan is actually the result of the EXPLAIN PLAN operation. The estimated plan may be slightly different from the actual plan, but you can assess the SQL statement in advance.

  2. In the Plan Details panel, view the estimated execution plan before you execute the SQL statement.

    The Planned Statistics Collection tab in the Plan Details panel displays following information:

  3. Run the statement.

    Click Run in the toolbar to execute the SELECT statement.

  4. Click Plan in the toolbar of the result set, to view the execution plan after the statement is executed.

    The Execution Details page displays the actual execution plan.

  5. View the basic information of the statement in the Basic Info section of the Execution Details panel.

    The Basic Info section displays the following information:

  6. View the time statistics of the statement in the Time Spent section of the Execution Details panel.

    The Time Spent section displays the following information and corresponding proportions in a bar graph.

  7. View the I/O statistics of the statement in the I/O Statistics section of the Execution Details panel.

    The I/O Statistics section displays the following information:

  8. View the plan statistics of the statement on the Planned Statistics Collection tab of the Execution Details panel.

    The Planned Statistics Collection tab displays the actual execution plan in a structured manner. This tab is the same as the Plan Details tab in structure. For more information about this tab, see the information about the Planned Statistics Collection tab in Step 3.

  9. View the outline of the statement in the Outline section of the Execution Details panel.

    The Outline section displays the corresponding content of OUTLINE DATA in results returned by the execution plan. The content in this section is a set of hints generated by the optimizer for the purpose of fully reproduce a plan.

Previous topic

Debug a stored procedure
Last

Next topic

Log on to ODC with an account
Next
on this page
Background information
Prerequisites
Procedure