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 - V3.2.4Enterprise Edition

  • Documentation Revision History
  • Document Overview
  • Get Started
    • What is OceanBase Database
      • Overview
      • Concepts
      • Compatibility with Oracle
        • Overview
        • SQL data types
        • Built-in functions
        • System views
      • Compatibility with MySQL
      • Management tools
      • Version rules
      • Limitations
    • Deploy OceanBase Database
      • Deployment introduction
      • Deployment process
      • Preparations
        • Prepare servers
        • Server configurations
        • Prepare installation packages
      • HA solution for OceanBase clusters
      • Deploy through the GUI
        • Configure the deployment environment
          • Deploy OAT
          • Verify deployment
          • Configure the clock source
          • Upload installation packages
          • Add a server
          • Initialize a server
        • Deploy OCP
          • Overview
          • Add an OCP configuration file
          • Deploy OCP
          • Verify deployment
        • Deploy the OceanBase cluster
          • (Optional) Configure DNS
          • Add an OBServer to the OCP resource pool
          • Create an OceanBase cluster
        • Deploy ODP
          • Overview
          • Deploy ODP
        • Create an OceanBase tenant
          • View resources available for a business tenant
          • Create a tenant
          • Verify deployment
        • Deploy OMS
          • Overview
          • Add an OMS configuration file
          • Deploy OMS
          • Verify deployment
        • Deploy ODC
          • Overview
          • Add an ODC configuration file
          • Deploy ODC
          • Verify deployment
      • Deploy through the CLI
        • Configure the deployment environment
          • Install oat-cli
          • Use oat-cli to configure the deployment environment
          • Configure the clock source
          • Upload installation packages
          • Configure host information
          • Check the environment before deployment
        • Deploy OCP
          • Overview
          • Generate a configuration file
          • Start deployment
          • Verify deployment
        • Deploy the OceanBase cluster
          • Deploy a single-replica OceanBase cluster
          • Deploy a three-replica OceanBase cluster
        • Deploy ODP
          • Deploy ODP by using the CLI
        • Create an OceanBase tenant
          • View resources available for a business tenant
          • Create a tenant
          • Verify deployment
        • Deploy OMS
          • Overview
          • Modify the configuration file
          • Start deployment
          • Verify deployment
        • Deploy ODC
          • Overview
          • Modify the configuration file
          • Start deployment
          • Verify deployment
    • Data migration
      • Overview
      • Migrate data by using OMS
        • Migrate data by using OMS
        • Migrate data from a MySQL database to a MySQL tenant of OceanBase Database by using OMS
        • Migrate data from a MySQL tenant of OceanBase Database to a MySQL database by using OMS
        • Migrate data from an Oracle database to a MySQL tenant of OceanBase Database by using OMS
        • Migrate data from an Oracle database to an Oracle tenant of OceanBase Database by using OMS
        • Migrate data from an Oracle tenant of OceanBase Database to an Oracle database by using OMS
        • Migrate data from a DB2 LUW database to a MySQL tenant of OceanBase Database by using OMS
        • Migrate data from a DB2 LUW database to an Oracle tenant of OceanBase Database by using OMS
        • Migrate data from a MySQL tenant of OceanBase Database to a DB2 LUW database by using OMS
        • Migrate data from an Oracle tenant of OceanBase Database to a DB2 LUW database by using OMS
        • Migrate data from a TiDB database to a MySQL tenant of OceanBase Database by using OMS
        • Migrate data between MySQL tenants of OceanBase Database by using OMS
        • Use OMS to migrate data between Oracle tenants of OceanBase Database
      • Migrate data by using OBLOADER & OBDUMPER
        • Import data by using OBLOADER
        • Export data by using OBDUMPER
      • Migrate data by using SQL scripts
      • Migrate data by using mysqldump
      • Migrate data by using DataX
      • Migrate data by using the OUTFILE statement
    • Database connections and routing
      • Overview
      • Manage ODP
        • ODP management overview
        • Manage ODP clusters
          • Create an ODP cluster
          • Manage ODP cluster parameters
          • Delete an ODP cluster
          • Upgrade all ODPs in an ODP cluster
          • Restart all ODPs in an ODP cluster
          • Manage OceanBase clusters connected to an ODP cluster
          • Monitor ODP cluster performance
        • Manage ODP
          • Add an ODP
          • Start an ODP
          • Refresh ODP configurations
          • Stop an ODP
          • Restart an ODP
          • Delete an ODP
          • Upgrade an ODP
        • ODP startup parameters
      • Database connections
        • Connect to OceanBase Database from OBClient
        • Connect to OceanBase Database from a MySQL client
        • Connect to OceanBase Database through ODC
      • Physical connections
      • Logical connections
        • Query all sessions
        • Query the details of a session
        • Query the metrics of a session
        • Query session variables
        • Terminate a session
      • Driver management
        • Overview
        • OB-ODBC
        • OBCI
        • OceanBase Connector/C
        • OceanBase Connector/J
      • Routing management
        • Table-based routing of ODP
        • SQL parser
        • LDC-based routing
        • ODP routing strategies
          • Read/Write splitting
          • Follower-first read
          • Blocklist mechanism
    • Cluster and multi-tenant management
      • Manage clusters
        • Create a cluster
        • Manage clusters
        • Manage cluster parameters
          • Overview
          • Query cluster-level parameters
          • Modify cluster-level parameters
        • Manage zones in a cluster
          • Overview of zone management
          • Add or delete a zone
          • Add or delete an encrypted zone
          • Start or stop a zone
          • Modify the configurations of a zone
          • Restart a zone
          • Isolate a failed zone
        • Manage OBServer nodes
          • Add an OBServer node
          • View OBServer node status
          • Stop or start an OBServer node
          • Restart an OBServer node
          • Isolate a failed OBServer node
          • Delete an OBServer node
          • Replace an OBServer node
        • View cluster information
        • Overview of cluster tenant management
        • Monitor cluster performance
        • Cluster performance report
        • View resource information of a cluster
      • Configuration management
        • Overview of configuration management
        • Set parameters
        • Set variables
        • Configure general parameters
        • Examples of parameter configuration in a production environment
        • Recommended minimum resource configuration
      • Resource management
        • Overview
        • Create a resource unit
        • Manage resource units
          • View configurations of a resource unit
          • Modify configurations of a resource unit
          • Drop a resource unit
        • Create a resource pool
        • Manage resource pools
          • Allocate a resource pool to a tenant
          • Modify a resource pool
          • Merge resource pools
          • Split a resource pool
          • Remove a resource pool from a tenant
          • Delete a resource pool
        • Query resource allocation
      • Tenant management
        • Overview of tenant management
        • Create a tenant
        • Copy a tenant
        • Manage tenants
          • Query tenant information
          • Modify a tenant
          • Rename a tenant
          • Drop a tenant
        • Manage users and privileges
          • Users and privileges
            • Overview
            • sys tenant
            • Oracle tenants
            • MySQL tenants
          • Oracle mode
            • Create a user
            • Set password complexity
            • Logon failure handling policies
            • View user privileges
            • Modify user privileges
            • Change the password of a user
            • Lock or unlock a user
            • Drop a user
            • Manage roles
              • Overview
              • Create a role
              • Assign a role to another role
              • Assign a role to a user
              • Specify valid or invalid roles for a user
              • View roles
              • Modify a role
              • Revoke a role
              • Drop a role
          • MySQL mode
            • Create a user
            • Set password complexity
            • Handle logon failures
            • View user privileges
            • Modify user privileges
            • Change the password of a user
            • Lock and unlock a user
            • Drop a user
        • Set and view the tenant allowlist
        • View the topology of a tenant
        • View the resource configurations of a tenant
        • Modify the resource configurations of a tenant
        • View the performance metrics of a tenant
        • View tenant sessions
        • Terminate a tenant session
        • Manage tenant parameters
          • Overview
          • Query tenant-level parameters
          • Modify tenant-level parameters
        • Manage tenant variables
      • Manage data storage
        • Minor compaction management
          • Overview
          • Automatically trigger a minor compaction
          • Manually initiate a minor compaction
          • View minor compaction information
          • Modify minor compaction settings
        • Major compaction management
          • Overview
          • Automatically trigger a major compaction
          • Configure scheduled major compactions
          • Manually initiate a major compaction
          • Manually control a major compaction
          • View major compaction information
            • View the major compaction process
            • View disk usage during a major compaction
          • Major compaction timeouts and errors
          • Modify major compaction settings
        • Data compression
          • Overview
          • Data encoding and compression
      • Manage memory
        • Overview
        • Memory structure
        • Set the maximum memory for an OceanBase database
        • Manage internal system memory
        • Manage internal tenant memory
        • Manage the memory of the plan cache
        • Query memory usage information
        • FAQ
      • Manage processes
        • Overview
        • Multi-tenant threads of OceanBase Database
        • FAQ about multi-tenant threads
        • Background threads of OceanBase Database
      • Manage logs
        • Log overview
        • Log generation levels
          • Log generation levels
          • Set a log generation level
        • Log file size and quantity management
          • Use the log file splitting feature
          • Control the number of log files
        • Query logs
          • Query the log of an SQL request
          • Query the log of a previous SQL request by using the SQL Trace feature
    • Database object management
      • Oracle mode
        • Manage tables
          • Overview
          • Create a table
          • Define column constraints
          • Query table definition
          • Modify a table
          • Empty a table
          • Drop a table
        • Manage table groups
          • Overview
          • Statements for table group management
        • Manage indexes
          • Overview
          • Create indexes
          • Query indexes
          • Drop an index
        • Manage views
        • Manage sequences
        • Manage synonyms
        • Manage triggers
          • Overview
          • Create a DML trigger
          • Create an INSTEAD OF trigger
          • Modify and drop a trigger
          • Disable or enable a trigger
          • Query trigger information
        • Manage directory objects
        • Manage DBLinks
      • MySQL mode
        • Manage databases
          • Create a database
          • View databases
          • Modify a database
          • Drop a database
        • Manage tables
          • Overview
          • Create a table
          • Define an auto-increment column
          • Define column constraints
          • Query table definition
          • Modify a table
          • Empty a table
          • Drop a table
        • Manage table groups
          • Overview
          • Statements for table group management
        • Manage indexes
          • Overview
          • Create indexes
          • Query indexes
          • Drop an index
        • Manage views
        • Manage sequences
        • Manage triggers
          • Overview
          • Create a DML trigger
          • Query trigger information
          • Drop a trigger
    • Distributed storage management
      • Overview of data distribution
      • Manage partitions
        • Oracle mode
          • Overview of partitions
          • Create a partitioned table
          • Manage a partitioned table
          • Create a subpartitioned table
          • Manage a subpartitioned table
          • Partition pruning
          • Query data in specified partitions
          • Create an index for a partitioned table
            • Overview of indexes
            • Local indexes
            • Global indexes
          • Create a partitioned table group
          • Add a partitioned table to a table group
          • Manage a partitioned table group
          • Create a subpartitioned table group
          • Add a subpartitioned table to a table group
          • Manage a subpartitioned table group
        • MySQL mode
          • Overview of partitions
          • Create a partitioned table
          • Manage a partitioned table
          • Create a subpartitioned table
          • Manage a subpartitioned table
          • Partition pruning
          • Query data in specified partitions
          • Create an index for a partitioned table
            • Overview of indexes
            • Local indexes
            • Global indexes
          • Create a partitioned table group
          • Add a partitioned table to a table group
          • Manage a partitioned table group
          • Create a subpartitioned table group
          • Add a subpartitioned table to a table group
          • Manage a subpartitioned table group
      • Manage replicas
        • Overview
        • Create a replica
        • Edit a tenant replica in a zone
        • Delete a tenant replica from a zone
      • Manage locality
        • Overview
        • Modify table locality
        • Modify tenant locality
      • Load balancing
        • Overview of load balancing
        • Manage automatic load balancing
        • Manually manage load balancing
          • Manually migrate and switch partition replicas
          • Set load balancing by using table groups
          • Set load balancing by primary zone
    • Performance tuning
      • Overview
      • Performance tools
        • System tools
          • General tool Top
          • CPU tools
          • Memory tools
          • Disk I/O tools
          • Network tools
        • Internal tables
          • gv$sysstat
          • gv$sql_audit
          • __all_virtual_trans_stat
        • Logs
          • slow trans
          • tenant dump
          • Slow queries
        • OCP
          • Monitoring and alerts
          • SQL diagnostics
          • Performance report
          • ASH report
          • Transaction diagnostics
          • Deadlock detection
      • System tuning
        • OS parameter tuning
        • Database parameter tuning
          • CPU parameters
          • I/O parameters
          • Memory-related parameters
          • Network transmission parameters
        • ODP parameter tuning
          • CPU parameters
          • Network transmission parameters
          • Route parameters on nodes
      • Business model tuning
        • Load balancing
        • SQL diagnostics
        • Distributed transactions
      • SQL tuning guide
        • Execution process of SQL queries
        • SQL execution plan
          • Introduction to SQL execution plans
          • Execution plan operators
            • TABLE SCAN
            • TABLE LOOKUP
            • JOIN
            • COUNT
            • GROUP BY
            • WINDOW FUNCTION
            • SUBPLAN FILTER
            • DISTINCT
            • SEQUENCE
            • MATERIAL
            • SORT
            • LIMIT
            • FOR UPDATE
            • SELECT INTO
            • SUBPLAN SCAN
            • UNION
            • INTERSECT
            • EXCEPT/MINUS
            • INSERT
            • DELETE
            • UPDATE
            • MERGE
            • EXCHANGE
            • GI
          • Plan cache
          • Fast parameterization
          • Real-time execution plan display
        • Distributed execution plan
          • Perform distributed execution and parallel queries
          • Generate a distributed plan
          • Schedule distributed execution plans
          • Manage distributed execution plans
          • Execute parallel queries
          • Perform parameter tuning for a parallel query
          • Parallel DML
        • SQL tuning
          • Overview
          • General procedure of SQL tuning
          • Monitor the SQL execution performance
            • gv$sql_audit
            • SQL Trace
            • Plan cache views
            • Examples of SQL performance analysis
              • Use SQL Audit to analyze wait events in a query
              • Analyze SQL queries that cause an abrupt RT jitter
              • View and analyze the shape of an execution plan
              • Analyze slow SQL queries
              • Query SQL traffic distribution and QPS
              • Check whether SQL queries are balanced across servers in a cluster
              • Find the TOP N SQL queries
              • Analyze whether an unusually large number of remote execution requests exist in the system or the execution of an SQL statement
              • Find full table scan SQL statements in a tenant
              • Find the TOP N queries with the longest execution time within a specified period
              • Analyze queries related to distributed plans
              • Check whether the RPC execution count of a distributed subplan is balanced across servers in a cluster
          • Optimizer statistics
            • Overview of statistics
            • Statistics collection methods
              • Overview
              • Histograms
              • Manual statistics collection
              • Automatic statistics collection
            • Statistics management
              • Overview
              • Deletion
              • Setting
              • Import and export
              • Locking and unlocking
              • History management
              • Statistics preference management
            • Examples
          • Query rewrite
            • Overview
            • Rule-based query rewrite
            • Cost-based query rewrite
          • Query optimization
            • Access path
              • Overview
              • Rule-based path selection
              • Cost-based path selection
            • Join algorithms
              • Overview
              • Join algorithms
              • Join order
          • Manage execution plans
            • Optimizer hints
            • Plan binding
            • SQL plan management
        • Glossary
        • General issues in SQL tuning
      • Performance diagnostics
        • Monitor and diagnose the cluster performance
        • Tenant performance diagnostics
        • Monitor ODP performance
        • Monitor host performance
      • Case analysis
      • Performance test (MySQL mode)
        • Sysbench OLTP
        • BenchMarkSQL
        • TPC-H
      • Performance test (Oracle mode)
        • BenchMarkSQL
        • TPC-H
    • Data high availability
      • Flashback
        • Objects supported by the recycle bin
        • Recycle bin for databases, tables, and indexes
        • Recycle bin for tenants
        • Flash back objects from the recycle bin
        • Restore point
        • Use a flashback query to query data of multiple versions
      • Manage physical backup and restore
        • Introduction to physical backup and restore
        • Deploy NFS
        • Data backup for a cluster
          • Perform a backup by using commands
            • Preparations for backup
            • Initiate a log backup
            • Initiate a data backup
          • Perform a backup for a cluster in OCP
          • Backup of a specified path for a tenant
          • Enable backup for clusters based on log splitting
          • Check the backup progress
          • Stop a backup
          • Automatically clear backup data for clusters
          • Manually clear backup data for clusters
          • Stop backup data clearing for clusters
        • Back up data backups
          • Overview
          • Perform a secondary backup for a cluster by using commands
            • Preparations for secondary backup
            • Initiate a secondary log backup
            • Initiate a secondary data backup
          • Perform a secondary backup for clusters in OCP
          • Perform a secondary backup for tenants
          • View the progress of secondary data backup tasks
          • Stop a secondary backup
          • Automatically clear secondary backup data for clusters
          • Manually clear secondary backup data
          • Stop clearing secondary backup data
        • Update access_id and access_key for OSS in the backup destination during backup
        • Verify data
          • Overview
          • Verify backup data in a cluster
          • Verify backup data in a specified path in a cluster
          • Verify backup data in a specified path across clusters
          • View data verification results
        • Restore data
          • Preparations for restore
          • Perform full restore
          • Restore a specified table
          • Restore secondary backup data
          • View the restore progress and results
          • Cancel restore
        • Routine maintenance
          • Query backup parameters
          • Force stop all backup-related tasks
          • Set backup_zone
      • Primary/Standby cluster management
        • Overview
        • Considerations and limitations
        • Deploy the primary and standby clusters
          • Configuration requirements
          • Deploy a primary cluster
          • Check the configurations of the primary cluster
          • Deploy standby clusters in OCP
        • Tenant management
        • Log transfer service
          • Overview
          • Set the log transfer parameter for a standby cluster
          • Configure log compression
        • Protection mode
          • Overview
          • Protection modes and protection levels
          • Switch to another protection mode
        • Role switching
          • Preparations for a switchover
          • Perform a switchover in a command-line tool
          • Perform a switchover in OCP
          • Perform a failover in a command-line tool
            • Preparations for a failover
            • Perform a lossless failover
            • Connect the original primary cluster after a lossless failover
            • Connect other standby clusters after a lossless failover
            • Perform a lossy failover
            • Restore other clusters after a lossy failover
            • Correct the data after a failover
          • Perform a failover in OCP
        • Standby cluster read service
        • Delete a standby cluster
        • Standby cluster disconnection
          • Preparations for disconnection
          • Disconnect a standby cluster
        • Troubleshooting
          • Failover errors
          • Switchover errors
          • Protection mode switching errors
          • Tenant creation for a standby cluster got stuck
          • Data synchronization enablement errors
          • Standby cluster disconnection errors
    • Database security
      • Data storage encryption
        • Overview
        • MySQL mode
          • Enable storage encryption for a new table
          • Enable storage encryption for an existing table
          • Decrypt a table
        • Oracle mode
          • Enable storage encryption for a new table
          • Enable storage encryption for an existing table
          • Decrypt a table
      • Data transmission encryption
        • Overview
        • Transmission encryption of OBServer nodes
        • Transmission encryption of ODPs
      • RPC connection authentication
      • Set row-level access control
      • Audit databases
        • Overview
        • Enable audit
        • Audit user logon operations
        • Audit user operations
        • Audit specified database objects
    • O&M management
      • O&M overview
        • Overview
        • Monitoring
          • View status monitoring information
          • View performance monitoring information
          • Perform SQL diagnostics
        • Alerts
          • Alert configuration
          • Manage alert subscriptions
          • Perform alert management
          • Manage alert items
      • Database upgrade
        • Overview
        • Perform an upgrade
        • Perform a major compaction
        • Check upgrade results
      • Scale-in and scale-out
        • Overview
        • Cluster-level scale-in and scale-out
          • Scale-out
            • Add zones to a cluster
            • Add OBServer nodes to zones
          • Scale-in
            • Delete zones from a cluster
            • Delete OBServer nodes from zones
        • Scale-in and scale-out of tenant resources
          • Modify unit_config
          • Modify UNIT_NUM
      • Resource isolation
        • cgroup-based resource isolation
          • Enable cgroups-based CPU isolation between tenant worker threads
          • Clear cgroup configurations
      • Routine inspections
        • Overview
        • Check the cluster status
        • Check cluster parameters
        • Check the host status
        • Check tenant resource usage
        • Check cluster resource usage
        • Check the OBServer node status
        • Check the NTP offset
        • Check data backup
        • Check the ODP connection status
      • Troubleshooting
        • Overview
        • Issue analysis
          • View alerts
          • View logs
          • View error codes
          • Query views
        • Troubleshoot OBServer node restart failures
        • Troubleshoot unexpected exit of an observer process
        • Troubleshoot bootstrap failures
        • Troubleshoot database connection issues
        • Troubleshoot clock synchronization issues
        • Troubleshoot the absence of a leader
        • Troubleshoot replica migration issues
        • Troubleshoot exhausted tenant MemStore memory
        • Tenant memory overrun
        • Troubleshoot major compaction exceptions
        • Overloaded OBServer nodes
        • Troubleshoot row lock contention
        • Troubleshoot transaction errors
      • Emergency response
        • Overview
        • Analysis, diagnosis, and decision-making process
        • Common emergency response
          • Exceptions caused by hardware
            • Node failures
            • Network jitter
            • ODP faults
            • Other exceptions related to hardware and network
          • Exceptions caused by capacity changes
            • Exceptions of SQL queries
            • High disk I/O on an OBServer node
            • Overloaded NIC on an OBServer node
            • Full occupation of tenant memory
            • Full usage of ODP threads
            • Full usage of OBServer clog disk
            • Full usage of the OBServer data disk
            • Accumulated request queue of a tenant
          • Other cluster exceptions
            • Blocked tenant minor compaction
            • Blocked cluster major compaction
            • sys tenant or RootService exceptions
            • Insufficiency or leakage of system memory
            • Slow query of the queuing table
    • System references
      • System parameters
        • Overview
        • Summary of system parameters
        • Cluster-level parameters
          • all_cluster_list
          • auto_broadcast_location_cache_rate_limit
          • auto_delete_expired_backup
          • auto_leader_switch_interval
          • auto_refresh_location_cache_rate_limit
          • autoinc_cache_refresh_interval
          • backup_backup_archive_log_batch_count
          • backup_backup_archivelog_retry_interval
          • backup_backup_dest
          • backup_backupset_batch_count
          • backup_backup_dest_option
          • backup_backupset_retry_interval
          • backup_concurrency
          • backup_dest
          • backup_dest_option
          • backup_log_archive_option
          • backup_net_limit
          • backup_recovery_window
          • backup_region
          • backup_zone
          • balance_blacklist_failure_threshold
          • balance_blacklist_retry_interval
          • balancer_emergency_percentage
          • balancer_idle_time
          • balancer_log_interval
          • balancer_task_timeout
          • balancer_timeout_check_interval
          • balancer_tolerance_percentage
          • bf_cache_miss_count_threshold
          • bf_cache_priority
          • builtin_db_data_verify_cycle
          • cache_wash_threshold
          • clog_cache_priority
          • clog_disk_usage_limit_percentage
          • clog_disk_utilization_threshold
          • clog_expire_days
          • clog_sync_time_warn_threshold
          • clog_transport_compress_all
          • clog_transport_compress_func
          • cluster
          • cluster_id
          • config_additional_dir
          • cpu_count
          • cpu_quota_concurrency
          • cpu_reserved
          • data_copy_concurrency
          • data_dir
          • data_disk_usage_limit_percentage
          • data_storage_error_tolerance_time
          • data_storage_warning_tolerance_time
          • datafile_disk_percentage
          • datafile_size
          • dead_socket_detection_timeout
          • debug_sync_timeout
          • default_compress
          • default_compress_func
          • default_row_format
          • default_transport_compress_func
          • devname
          • disk_io_thread_count
          • dtl_buffer_size
          • election_blacklist_interval
          • election_cpu_quota
          • enable_async_syslog
          • enable_auto_leader_switch
          • enable_auto_refresh_location_cache
          • enable_ddl
          • enable_election_group
          • enable_global_freeze_trigger
          • enable_log_archive
          • enable_major_freeze
          • enable_manual_merge
          • enable_merge_by_turn
          • enable_ob_ratelimit
          • enable_one_phase_commit
          • enable_perf_event
          • enable_pg
          • enable_rebalance
          • enable_record_trace_id
          • enable_record_trace_log
          • enable_rereplication
          • enable_rich_error_msg
          • enable_rootservice_standalone
          • enable_separate_sys_clog
          • enable_smooth_leader_switch
          • enable_sql_audit
          • enable_sql_operator_dump
          • enable_sys_unit_standalone
          • enable_syslog_recycle
          • enable_syslog_wf
          • enable_tcp_keepalive
          • enable_unit_balance_resource_weight
          • enable_upgrade_mode
          • fast_recovery_concurrency
          • flush_log_at_trx_commit
          • force_refresh_location_cache_interval
          • force_refresh_location_cache_threshold
          • freeze_trigger_percentage
          • fuse_row_cache_priority
          • gc_wait_archive
          • get_leader_candidate_rpc_timeout
          • global_index_build_single_replica_timeout
          • global_major_freeze_residual_memory
          • global_write_halt_residual_memory
          • high_priority_net_thread_count
          • ignore_replay_checksum_error
          • ignore_replica_checksum_error
          • ilog_index_expire_time
          • index_cache_priority
          • index_clog_cache_priority
          • index_info_block_cache_priority
          • internal_sql_execute_timeout
          • large_query_threshold
          • large_query_worker_percentage
          • leak_mod_to_check
          • lease_time
          • location_cache_cpu_quota
          • location_cache_expire_time
          • location_cache_priority
          • location_cache_refresh_min_interval
          • location_cache_refresh_rpc_timeout
          • location_cache_refresh_sql_timeout
          • location_fetch_concurrency
          • location_refresh_thread_count
          • log_archive_batch_buffer_limit
          • log_archive_checkpoint_interval
          • log_archive_concurrency
          • log_restore_concurrency
          • major_compact_trigger
          • major_freeze_duty_time
          • max_kept_major_version_number
          • max_px_worker_count
          • max_string_print_length
          • max_syslog_file_count
          • memory_chunk_cache_size
          • memory_limit
          • memory_limit_percentage
          • memory_reserved
          • memstore_limit_percentage
          • merge_stat_sampling_ratio
          • merge_thread_count
          • merger_check_interval
          • merger_completion_percentage
          • merger_switch_leader_duration_time
          • merger_warm_up_duration_time
          • micro_block_merge_verify_level
          • migrate_concurrency
          • migration_disable_time
          • min_observer_version
          • minor_compact_trigger
          • minor_deferred_gc_time
          • minor_freeze_times
          • minor_merge_concurrency
          • minor_warm_up_duration_time
          • multiblock_read_gap_size
          • multiblock_read_size
          • mysql_port
          • net_thread_count
          • ob_event_history_recycle_interval
          • ob_ratelimit_stat_period
          • obconfig_url
          • ofs_list
          • partition_table_check_interval
          • partition_table_scan_batch_count
          • plan_cache_evict_interval
          • plan_cache_high_watermark
          • plan_cache_low_watermark
          • px_task_size
          • px_workers_per_cpu_quota
          • rebuild_replica_data_lag_threshold
          • recyclebin_object_expire_time
          • replica_safe_remove_time
          • resource_hard_limit
          • resource_soft_limit
          • restore_concurrency
          • rootservice_async_task_queue_size
          • rootservice_async_task_thread_count
          • rootservice_list
          • rootservice_memory_limit
          • rootservice_ready_check_interval
          • row_compaction_update_limit
          • row_purge_thread_count
          • rpc_port
          • rpc_timeout
          • schema_history_expire_time
          • schema_history_recycle_interval
          • server_balance_cpu_mem_tolerance_percent
          • server_balance_critical_disk_waterlevel
          • server_balance_disk_tolerance_percent
          • server_check_interval
          • server_cpu_quota_max
          • server_cpu_quota_min
          • server_data_copy_in_concurrency
          • server_data_copy_out_concurrency
          • server_permanent_offline_time
          • server_temporary_offline_time
          • sql_audit_memory_limit
          • sql_audit_queue_size
          • ssl_client_authentication
          • ssl_external_kms_info
          • stack_size
          • switchover_process_thread_count
          • sys_bkgd_io_high_percentage
          • sys_bkgd_io_low_percentage
          • sys_bkgd_migration_change_member_list_timeout
          • sys_bkgd_migration_retry_num
          • sys_bkgd_net_percentage
          • sys_cpu_limit_trigger
          • syslog_io_bandwidth_limit
          • syslog_level
          • system_cpu_quota
          • system_memory
          • system_trace_level
          • tableapi_transport_compress_func
          • tablet_size
          • tcp_keepcnt
          • tcp_keepidle
          • tcp_keepintvl
          • tenant_cpu_variation_per_server
          • tenant_groups
          • tenant_task_queue_size
          • token_reserved_percentage
          • trace_log_sampling_interval
          • trace_log_slow_query_watermark
          • trx_2pc_retry_interval
          • trx_force_kill_threshold
          • trx_try_wait_lock_timeout
          • unit_balance_resource_weight
          • use_large_pages
          • user_block_cache_priority
          • user_iort_up_percentage
          • user_row_cache_priority
          • user_tab_col_stat_cache_priority
          • virtual_table_location_cache_expire_time
          • wait_leader_batch_count
          • weak_read_version_refresh_interval
          • workers_per_cpu_quota
          • zone
          • zone_merge_concurrency
          • zone_merge_order
          • zone_merge_timeout
          • ob_esi_rpc_port
          • enable_ob_esi_process
          • ob_esi_session_timeout
          • ob_esi_io_concurrency
          • ob_esi_memory_limit
          • ob_esi_syslog_level
          • ob_esi_max_syslog_file_count
          • sql_login_thread_count
          • diag_syslog_per_error_limit
          • enable_cgroup
          • rpc_client_authentication_method
          • rpc_server_authentication_method
          • max_trx_part_size
        • Tenant-level parameters
          • audit_sys_operations
          • audit_trail
          • clog_max_unconfirmed_log_count
          • clog_persistence_compress_func
          • connection_control_failed_connections_threshold
          • connection_control_min_connection_delay
          • connection_control_max_connection_delay
          • default_progressive_merge_num
          • enable_clog_persistence_compress
          • enable_early_lock_release
          • enable_monotonic_weak_read
          • external_kms_info
          • enable_sql_extension
          • job_queue_processes
          • max_stale_time_for_weak_consistency
          • ob_enable_batched_multi_statement
          • ob_proxy_readonly_transaction_routing_policy
          • ob_ssl_invited_common_names
          • open_cursors
          • plsql_ccflags
          • plsql_code_type
          • plsql_debug
          • plsql_optimize_level
          • plsql_v2_compatibility
          • plsql_warnings
          • sql_work_area
          • tde_method
          • writing_throttling_maximum_duration
          • writing_throttling_trigger_percentage
          • workarea_size_policy
          • ob_query_switch_leader_retry_timeout
      • System variables (MySQL mode)
        • Overview
        • System variable summary
        • auto_increment_cache_size
        • auto_increment_increment
        • auto_increment_offset
        • autocommit
        • binlog_row_image
        • block_encryption_mode
        • character_set_client
        • character_set_connection
        • character_set_database
        • character_set_filesystem
        • character_set_results
        • character_set_server
        • character_set_system
        • collation_connection
        • collation_database
        • collation_server
        • connect_timeout
        • datadir
        • debug_sync
        • default_password_lifetime
        • div_precision_increment
        • error_on_overlap_time
        • explicit_defaults_for_timestamp
        • foreign_key_checks
        • group_concat_max_len
        • identity
        • init_connect
        • interactive_timeout
        • is_result_accurate
        • last_insert_id
        • license
        • lower_case_table_names
        • max_allowed_packet
        • max_sp_recursion_depth
        • max_user_connections
        • net_buffer_length
        • net_read_timeout
        • net_write_timeout
        • nls_calendar
        • nls_characterset
        • nls_comp
        • nls_currency
        • nls_date_format
        • nls_date_language
        • nls_dual_currency
        • nls_iso_currency
        • nls_language
        • nls_length_semantics
        • nls_nchar_characterset
        • nls_nchar_conv_excp
        • nls_numeric_characters
        • nls_sort
        • nls_territory
        • nls_timestamp_format
        • nls_timestamp_tz_format
        • ob_bnl_join_cache_size
        • ob_capability_flag
        • ob_compatibility_mode
        • ob_create_table_strict_mode
        • ob_default_replica_num
        • ob_early_lock_release
        • ob_enable_aggregation_pushdown
        • ob_enable_blk_nestedloop_join
        • ob_enable_hash_group_by
        • ob_enable_index_direct_select
        • ob_enable_jit
        • ob_enable_plan_cache
        • ob_enable_sql_audit
        • ob_enable_trace_log
        • ob_enable_transformation
        • ob_enable_transmission_checksum
        • ob_enable_truncate_flashback
        • ob_global_debug_sync
        • ob_last_schema_version
        • ob_log_level
        • ob_max_parallel_degree
        • ob_org_cluster_id
        • ob_pl_block_timeout
        • ob_plan_cache_evict_high_percentage
        • ob_plan_cache_evict_low_percentage
        • ob_plan_cache_percentage
        • ob_proxy_global_variables_version
        • ob_proxy_partition_hit
        • ob_proxy_set_trx_executed
        • ob_query_timeout
        • ob_read_consistency
        • ob_reserved_meta_memory_percentage
        • ob_route_policy
        • ob_safe_weak_read_snapshot
        • ob_sql_audit_percentage
        • ob_sql_work_area_percentage
        • ob_stmt_parallel_degree
        • ob_tcp_invited_nodes
        • ob_temp_tablespace_size_percentage
        • ob_timestamp_service
        • ob_trace_info
        • ob_trx_idle_timeout
        • ob_trx_lock_timeout
        • ob_trx_timeout
        • optimizer_capture_sql_plan_baselines
        • optimizer_use_sql_plan_baselines
        • parallel_max_servers
        • parallel_servers_target
        • performance_schema
        • plugin_dir
        • query_cache_size
        • query_cache_type
        • read_only
        • recyclebin
        • resource_manager_plan
        • secure_file_priv
        • sql_auto_is_null
        • sql_mode
        • sql_quote_show_create
        • sql_safe_updates
        • sql_select_limit
        • sql_throttle_current_priority
        • sql_throttle_network
        • sql_throttle_priority
        • sql_throttle_rt
        • sql_warnings
        • system_time_zone
        • time_zone
        • timestamp
        • tracefile_identifier
        • transaction_isolation
        • transaction_read_only
        • tx_isolation
        • tx_read_only
        • undo_retention
        • version
        • version_comment
        • wait_timeout
        • validate_password_check_user_name
        • validate_password_length
        • validate_password_mixed_case_count
        • validate_password_number_count
        • validate_password_policy
        • validate_password_special_char_count
        • server_uuid
        • binlog_format
        • binlog_checksum
        • binlog_rows_query_log_events
        • log_bin
        • server_id
        • default_storage_engine
        • max_connections
        • event_scheduler
        • cte_max_recursion_depth
        • regexp_stack_limit
        • regexp_time_limit
      • System variables (Oracle mode)
        • Overview
        • System variable summary
        • auto_increment_cache_size
        • auto_increment_increment
        • auto_increment_offset
        • autocommit
        • binlog_row_image
        • block_encryption_mode
        • character_set_client
        • character_set_connection
        • character_set_database
        • character_set_filesystem
        • character_set_results
        • character_set_server
        • character_set_system
        • collation_connection
        • collation_database
        • collation_server
        • connect_timeout
        • datadir
        • debug_sync
        • default_password_lifetime
        • div_precision_increment
        • error_on_overlap_time
        • explicit_defaults_for_timestamp
        • foreign_key_checks
        • group_concat_max_len
        • identity
        • init_connect
        • interactive_timeout
        • is_result_accurate
        • last_insert_id
        • license
        • lower_case_table_names
        • max_allowed_packet
        • max_sp_recursion_depth
        • max_user_connections
        • net_buffer_length
        • net_read_timeout
        • net_write_timeout
        • nls_calendar
        • nls_characterset
        • nls_comp
        • nls_currency
        • nls_date_format
        • nls_date_language
        • nls_dual_currency
        • nls_iso_currency
        • nls_language
        • nls_length_semantics
        • nls_nchar_characterset
        • nls_nchar_conv_excp
        • nls_numeric_characters
        • nls_sort
        • nls_territory
        • nls_timestamp_format
        • nls_timestamp_tz_format
        • ob_bnl_join_cache_size
        • ob_capability_flag
        • ob_compatibility_mode
        • ob_create_table_strict_mode
        • ob_default_replica_num
        • ob_early_lock_release
        • ob_enable_aggregation_pushdown
        • ob_enable_blk_nestedloop_join
        • ob_enable_hash_group_by
        • ob_enable_index_direct_select
        • ob_enable_jit
        • ob_enable_plan_cache
        • ob_enable_sql_audit
        • ob_enable_trace_log
        • ob_enable_transformation
        • ob_enable_transmission_checksum
        • ob_enable_truncate_flashback
        • ob_global_debug_sync
        • ob_last_schema_version
        • ob_log_level
        • ob_max_parallel_degree
        • ob_org_cluster_id
        • ob_pl_block_timeout
        • ob_plan_cache_evict_high_percentage
        • ob_plan_cache_evict_low_percentage
        • ob_plan_cache_percentage
        • ob_proxy_global_variables_version
        • ob_proxy_partition_hit
        • ob_proxy_set_trx_executed
        • ob_query_timeout
        • ob_read_consistency
        • ob_reserved_meta_memory_percentage
        • ob_route_policy
        • ob_safe_weak_read_snapshot
        • ob_sql_audit_percentage
        • ob_sql_work_area_percentage
        • ob_stmt_parallel_degree
        • ob_tcp_invited_nodes
        • ob_temp_tablespace_size_percentage
        • ob_timestamp_service
        • ob_trace_info
        • ob_trx_idle_timeout
        • ob_trx_lock_timeout
        • ob_trx_timeout
        • optimizer_capture_sql_plan_baselines
        • optimizer_use_sql_plan_baselines
        • parallel_max_servers
        • parallel_servers_target
        • performance_schema
        • plugin_dir
        • query_cache_size
        • query_cache_type
        • read_only
        • recyclebin
        • resource_manager_plan
        • secure_file_priv
        • sql_auto_is_null
        • sql_quote_show_create
        • sql_select_limit
        • sql_throttle_current_priority
        • sql_throttle_network
        • sql_throttle_priority
        • sql_throttle_rt
        • sql_warnings
        • system_time_zone
        • sql_safe_updates
        • time_zone
        • timestamp
        • tracefile_identifier
        • transaction_isolation
        • transaction_read_only
        • tx_isolation
        • tx_read_only
        • undo_retention
        • version
        • version_comment
        • wait_timeout
        • validate_password_check_user_name
        • validate_password_length
        • validate_password_mixed_case_count
        • validate_password_number_count
        • validate_password_policy
        • validate_password_special_char_count
        • event_scheduler
      • System views (MySQL mode)
        • Overview
        • Dictionary views
          • Overview
          • mysql.help_topic
          • mysql.help_category
          • mysql.help_keyword
          • mysql.help_relation
          • mysql.db
          • mysql.proc
          • mysql.time_zone
          • mysql.time_zone_name
          • mysql.time_zone_transition
          • mysql.time_zone_transition_type
          • mysql.user
          • information_schema.CHARACTER_SETS
          • information_schema.CHECK_CONSTRAINTS
          • information_schema.COLLATIONS
          • information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
          • information_schema.COLUMNS
          • information_schema.DBA_OUTLINES
          • information_schema.ENGINES
          • information_schema.GLOBAL_STATUS
          • information_schema.GLOBAL_VARIABLES
          • information_schema.KEY_COLUMN_USAGE
          • information_schema.PARAMETERS
          • information_schema.PARTITIONS
          • information_schema.PROCESSLIST
          • information_schema.REFERENTIAL_CONSTRAINTS
          • information_schema.ROUTINES
          • information_schema.SCHEMATA
          • information_schema.SCHEMA_PRIVILEGES
          • information_schema.SESSION_STATUS
          • information_schema.SESSION_VARIABLES
          • information_schema.STATISTICS
          • information_schema.TABLES
          • information_schema.TABLE_CONSTRAINTS
          • information_schema.TABLE_PRIVILEGES
          • information_schema.USER_PRIVILEGES
          • information_schema.USER_RECYCLEBIN
          • information_schema.VIEWS
          • information_schema.CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS
          • oceanbase.CDB_OB_BACKUP_ARCHIVELOG_SUMMARY
          • oceanbase.CDB_OB_BACKUP_JOB_DETAILS
          • oceanbase.CDB_OB_BACKUP_SET_DETAILS
          • oceanbase.CDB_OB_BACKUP_PROGRESS
          • oceanbase.CDB_OB_BACKUP_SET_EXPIRED
          • oceanbase.CDB_OB_BACKUP_ARCHIVELOG_PROGRESS
          • oceanbase.CDB_OB_BACKUP_CLEAN_HISTORY
          • oceanbase.CDB_OB_BACKUP_TASK_CLEAN_HISTORY
          • oceanbase.CDB_OB_RESTORE_PROGRESS
          • oceanbase.CDB_OB_RESTORE_HISTORY
          • oceanbase.CDB_CKPT_HISTORY
          • oceanbase.CDB_OB_BACKUP_VALIDATION_JOB
          • oceanbase.CDB_OB_BACKUP_VALIDATION_JOB_HISTORY
          • oceanbase.CDB_OB_TENANT_BACKUP_VALIDATION_TASK
          • oceanbase.CDB_OB_BACKUP_VALIDATION_TASK_HISTORY
          • oceanbase.CDB_OB_BACKUP_BACKUP_ARCHIVELOG_SUMMARY
          • oceanbase.CDB_OB_BACKUP_BACKUPSET_TASK_HISTORY
          • oceanbase.CDB_OB_BACKUP_BACKUPSET_TASK
          • oceanbase.CDB_OB_BACKUP_BACKUPSET_JOB_HISTORY
          • oceanbase.CDB_OB_BACKUP_BACKUPSET_JOB
          • oceanbase.CDB_OB_BACKUP_SET_OBSOLETE
          • oceanbase.CDB_OB_BACKUP_ARCHIVELOG
          • oceanbase.CDB_OB_BACKUP_BACKUP_ARCHIVELOG
          • oceanbase.CDB_OB_BACKUP_BACKUPPIECE_JOB
          • oceanbase.CDB_OB_BACKUP_BACKUPPIECE_JOB_HISTORY
          • oceanbase.CDB_OB_BACKUP_BACKUPPIECE_TASK
          • oceanbase.CDB_OB_BACKUP_BACKUPPIECE_TASK_HISTORY
          • oceanbase.CDB_OB_BACKUP_PIECE_FILES
          • oceanbase.CDB_OB_BACKUP_SET_FILES
          • information_schema.ST_GEOMETRY_COLUMNS
          • information_schema.ST_SPATIAL_REFERENCE_SYSTEMS
          • oceanbase.DBA_RSRC_PLANS
          • oceanbase.DBA_RSRC_PLAN_DIRECTIVES
          • oceanbase.DBA_RSRC_GROUP_MAPPINGS
          • oceanbase.DBA_RSRC_CONSUMER_GROUPS
        • Performance views
          • Overview
          • gv$plan_cache_stat
          • gv$plan_cache_plan_stat
          • gv$session_event
          • gv$session_wait
          • gv$session_wait_history
          • gv$system_event
          • gv$sesstat
          • gv$sysstat
          • gv$sql_audit
          • gv$latch
          • gv$memory
          • gv$memstore
          • gv$memstore_info
          • gv$plan_cache_plan_explain
          • gv$obrpc_outgoing
          • gv$obrpc_incoming
          • gv$sql
          • gv$sql_plan_monitor
          • gv$outline
          • gv$concurrent_limit_sql
          • gv$sql_plan_statistics
          • gv$server_memstore
          • gv$unit_load_balance_event_history
          • gv$tenant
          • gv$database
          • gv$table
          • gv$unit
          • gv$partition
          • gv$lock_wait_stat
          • gv$session_longops
          • gv$tenant_memstore_allocator_info
          • gv$minor_merge_info
          • gv$tenant_px_worker_stat
          • gv$partition_audit
          • gv$ps_stat
          • gv$ps_item_info
          • gv$sql_workarea
          • gv$sql_workarea_histogram
          • gv$ob_sql_workarea_memory_info
          • gv$server_schema_info
          • gv$merge_info
          • gv$lock
          • gv$sstable
          • gv$ob_trans_table_status
          • gv$tenant_memory_info
          • v$statname
          • v$event_name
          • v$session_event
          • v$session_wait
          • v$session_wait_history
          • v$sesstat
          • v$sysstat
          • v$system_event
          • v$memory
          • v$memstore
          • v$memstore_info
          • v$plan_cache_stat
          • v$plan_cache_plan_stat
          • v$plan_cache_plan_explain
          • v$sql_audit
          • v$obrpc_outgoing
          • v$obrpc_incoming
          • v$sql
          • v$sql_plan_monitor
          • v$sql_plan_statistics
          • v$unit
          • v$partition
          • v$lock_wait_stat
          • v$session_longops
          • v$latch
          • v$tenant_memstore_allocator_info
          • v$tenant_px_worker_stat
          • v$partition_audit
          • v$ob_cluster
          • v$ob_standby_status
          • v$ob_cluster_stats
          • v$ob_cluster_event_history
          • v$ps_stat
          • v$ps_item_info
          • v$sql_workarea
          • v$sql_workarea_active
          • v$sql_workarea_histogram
          • v$ob_sql_workarea_memory_info
          • v$ob_timestamp_service
          • v$server_schema_info
          • v$merge_info
          • v$lock
          • v$sql_monitor_statname
          • v$restore_point
          • v$ob_cluster_failover_info
          • v$encrypted_tables
          • v$encrypted_tablespaces
          • v$sstable
          • v$ob_trans_table_status
          • v$ob_all_clusters
          • v$tenant_memory_info
          • GV$OB_DTL_INTERM_RESULT_MONITOR
          • V$OB_DTL_INTERM_RESULT_MONITOR
          • V$RSRC_PLAN
      • System views (Oracle mode)
        • Overview
        • Dictionary views
          • Overview
          • ALL_ALL_TABLES
          • ALL_ARGUMENTS
          • ALL_COL_COMMENTS
          • ALL_COLL_TYPES
          • ALL_COL_PRIVS
          • ALL_CONSTRAINTS
          • ALL_CONS_COLUMNS
          • ALL_DEF_AUDIT_OPTS
          • ALL_DEPENDENCIES
          • ALL_DIRECTORIES
          • ALL_ERRORS
          • ALL_INDEXES
          • ALL_IND_COLUMNS
          • ALL_IND_EXPRESSIONS
          • ALL_IND_PARTITIONS
          • ALL_IND_SUBPARTITIONS
          • ALL_METHOD_PARAMS
          • ALL_OBJECTS
          • ALL_PART_COL_STATISTICS
          • ALL_PART_HISTOGRAMS
          • ALL_PART_INDEXES
          • ALL_PART_KEY_COLUMNS
          • ALL_PART_TABLES
          • ALL_PROCEDURES
          • ALL_PROFILES
          • ALL_SCHEDULER_JOB_ARGS
          • ALL_SCHEDULER_PROGRAM_ARGS
          • ALL_SEQUENCES
          • ALL_SOURCE
          • ALL_SUBPART_COL_STATISTICS
          • ALL_SUBPART_HISTOGRAMS
          • ALL_SUBPARTITION_TEMPLATES
          • ALL_SUBPART_KEY_COLUMNS
          • ALL_SYNONYMS
          • ALL_TABLES
          • ALL_TAB_COL_STATISTICS
          • ALL_TAB_COLS
          • ALL_TAB_COLUMNS
          • ALL_TAB_COMMENTS
          • ALL_TAB_HISTOGRAMS
          • ALL_TAB_PARTITIONS
          • ALL_TAB_PRIVS
          • ALL_TAB_STATISTICS
          • ALL_TAB_STATS_HISTORY
          • ALL_TAB_SUBPARTITIONS
          • ALL_TRIGGERS
          • ALL_TYPES
          • ALL_TYPE_ATTRS
          • ALL_TYPE_METHODS
          • ALL_USERS
          • ALL_VIEWS
          • AUDIT_ACTIONS
          • DBA_ALL_TABLES
          • DBA_ARGUMENTS
          • DBA_AUDIT_EXISTS
          • DBA_AUDIT_OBJECT
          • DBA_AUDIT_SESSION
          • DBA_AUDIT_STATEMENT
          • DBA_AUDIT_TRAIL
          • DBA_COLL_TYPES
          • DBA_COL_COMMENTS
          • DBA_COL_PRIVS
          • DBA_CONSTRAINTS
          • DBA_CONS_COLUMNS
          • DBA_ERRORS
          • DBA_INDEXES
          • DBA_IND_COLUMNS
          • DBA_IND_EXPRESSIONS
          • DBA_IND_PARTITIONS
          • DBA_IND_SUBPARTITIONS
          • DBA_METHOD_PARAMS
          • DBA_OBJECTS
          • DBA_OBJ_AUDIT_OPTS
          • DBA_PART_INDEXES
          • DBA_PART_KEY_COLUMNS
          • DBA_PART_TABLES
          • DBA_PROCEDURES
          • DBA_PROFILES
          • DBA_ROLES
          • DBA_ROLE_PRIVS
          • DBA_SCHEDULER_JOB_ARGS
          • DBA_SCHEDULER_JOBS
          • DBA_SCHEDULER_PROGRAM
          • DBA_SCHEDULER_PROGRAM_ARGS
          • DBA_SEGMENTS
          • DBA_SEQUENCES
          • DBA_SOURCE
          • DBA_STMT_AUDIT_OPTS
          • DBA_SUBPARTITION_TEMPLATES
          • DBA_SUBPART_KEY_COLUMNS
          • DBA_SYNONYMS
          • DBA_SYS_PRIVS
          • DBA_TABLES
          • DBA_TABLESPACES
          • DBA_TAB_COLS
          • DBA_TAB_COLUMNS
          • DBA_TAB_COMMENTS
          • DBA_TAB_PARTITIONS
          • DBA_TAB_PRIVS
          • DBA_TAB_STATS_HISTORY
          • DBA_TAB_SUBPARTITIONS
          • DBA_TRIGGERS
          • DBA_TYPES
          • DBA_TYPE_ATTRS
          • DBA_TYPE_METHODS
          • DBA_USERS
          • DBA_VIEWS
          • DBA_JOBS_RUNNING
          • DBA_JOBS
          • DBA_RECYCLEBIN
          • DBA_DEPENDENCIES
          • DBA_RSRC_CONSUMER_GROUPS
          • DBA_RSRC_GROUP_MAPPINGS
          • DBA_RSRC_PLANS
          • DBA_RSRC_PLAN_DIRECTIVES
          • DBA_DIRECTORIES
          • DBA_PART_COL_STATISTICS
          • DBA_PART_HISTOGRAMS
          • DBA_SUBPART_COL_STATISTICS
          • DBA_SUBPART_HISTOGRAMS
          • DBA_TAB_COL_STATISTICS
          • DBA_TAB_HISTOGRAMS
          • DBA_TAB_STATISTICS
          • DICT
          • DICTIONARY
          • NLS_DATABASE_PARAMETERS
          • NLS_INSTANCE_PARAMETERS
          • NLS_SESSION_PARAMETERS
          • ROLE_ROLE_PRIVS
          • ROLE_SYS_PRIVS
          • ROLE_TAB_PRIVS
          • STMT_AUDIT_OPTION_MAP
          • TENANT_VIRTUAL_GLOBAL_VARIABLE
          • TENANT_VIRTUAL_SESSION_VARIABLE
          • USER_ALL_TABLES
          • USER_ARGUMENTS
          • USER_AUDIT_OBJECT
          • USER_AUDIT_SESSION
          • USER_AUDIT_STATEMENT
          • USER_AUDIT_TRAIL
          • USER_COLL_TYPES
          • USER_COL_COMMENTS
          • USER_COL_PRIVS
          • USER_CONSTRAINTS
          • USER_CONS_COLUMNS
          • USER_ERRORS
          • USER_INDEXES
          • USER_IND_COLUMNS
          • USER_IND_EXPRESSIONS
          • USER_IND_PARTITIONS
          • USER_IND_SUBPARTITIONS
          • USER_OBJECTS
          • USER_PART_INDEXES
          • USER_PART_KEY_COLUMNS
          • USER_PART_TABLES
          • USER_PROCEDURES
          • USER_PROFILES
          • USER_ROLE_PRIVS
          • USER_SEGMENTS
          • USER_SEQUENCES
          • USER_SOURCE
          • USER_SUBPARTITION_TEMPLATES
          • USER_SUBPART_KEY_COLUMNS
          • USER_SYNONYMS
          • USER_SYS_PRIVS
          • USER_TAB_STATS_HISTORY
          • USER_TAB_SUBPARTITIONS
          • USER_TRIGGERS
          • USER_TABLES
          • USER_TABLESPACES
          • USER_TAB_COLS
          • USER_TAB_COLUMNS
          • USER_TAB_COMMENTS
          • USER_TAB_PARTITIONS
          • USER_TAB_PRIVS
          • USER_TYPES
          • USER_TYPE_ATTRS
          • USER_TYPE_METHODS
          • USER_JOBS
          • USER_VIEWS
          • USER_RECYCLEBIN
          • USER_DEPENDENCIES
          • USER_PART_COL_STATISTICS
          • USER_PART_HISTOGRAMS
          • USER_SUBPART_COL_STATISTICS
          • USER_SUBPART_HISTOGRAMS
          • USER_TAB_COL_STATISTICS
          • USER_TAB_HISTOGRAMS
          • USER_TAB_STATISTICS
          • DBA_CONTEXT
        • Performance views
          • Overview
          • GV$CONCURRENT_LIMIT_SQL
          • GV$DBLINK
          • GV$GLOBAL_TRANSACTION
          • GV$INSTANCE
          • GV$LOCK
          • GV$MEMORY
          • GV$MEMSTORE
          • GV$MEMSTORE_INFO
          • GV$OB_SQL_WORKAREA_MEMORY_INFO
          • GV$OPEN_CURSOR
          • GV$OUTLINE
          • GV$PLAN_CACHE_PLAN_EXPLAIN
          • GV$PLAN_CACHE_PLAN_STAT
          • GV$PLAN_CACHE_STAT
          • GV$PS_ITEM_INFO
          • GV$PS_STAT
          • GV$SERVER_MEMSTORE
          • GV$SESSION_WAIT
          • GV$SESSION_WAIT_HISTORY
          • GV$SESSTAT
          • GV$SQL_AUDIT
          • GV$SQL_WORKAREA
          • GV$SQL_WORKAREA_ACTIVE
          • GV$SQL_WORKAREA_HISTOGRAM
          • GV$SYSSTAT
          • GV$SYSTEM_EVENT
          • GV$SSTABLE
          • GV$TENANT_MEMORY_INFO
          • V$DBLINK
          • V$ENCRYPTED_TABLES
          • V$ENCRYPTED_TABLESPACES
          • V$GLOBAL_TRANSACTION
          • V$INSTANCE
          • V$LOCK
          • V$MEMORY
          • V$MEMSTORE
          • V$MEMSTORE_INFO
          • V$NLS_PARAMETERS
          • V$OB_SQL_WORKAREA_MEMORY_INFO
          • V$OPEN_CURSOR
          • V$PLAN_CACHE_PLAN_EXPLAIN
          • V$PLAN_CACHE_PLAN_STAT
          • V$PLAN_CACHE_STAT
          • V$PS_ITEM_INFO
          • V$PS_STAT
          • V$RESTORE_POINT
          • V$RSRC_PLAN
          • V$SESSION_WAIT
          • V$SESSION_WAIT_HISTORY
          • V$SESSTAT
          • V$SQL_AUDIT
          • V$SQL_MONITOR_STATNAME
          • V$SQL_WORKAREA
          • V$SQL_WORKAREA_ACTIVE
          • V$SQL_WORKAREA_HISTOGRAM
          • V$SSTABLE
          • V$SYSSTAT
          • V$SYSTEM_EVENT
          • V$TIMEZONE_NAMES
          • V$TENANT_MEMORY_INFO
          • V$VERSION
          • GV$OB_DTL_INTERM_RESULT_MONITOR
          • V$OB_DTL_INTERM_RESULT_MONITOR
          • V$GLOBALCONTEXT
      • Error codes (MySQL mode)
        • Overview
        • 0001 to 3999
        • 4000 to 4499
        • 4500 to 4999
        • 5000 to 5999
        • 6000 to 6999
        • 7000 to 7999
        • 8000 to 8999
        • 9000 to 9499
        • 9500 to 9999
        • 22998, 30926, 38104, and 38105
      • Error codes (Oracle mode)
        • Overview
        • ORA-00000 to ORA-00999
        • ORA-01000 to ORA-01499
        • ORA-01500 to ORA-01999
        • ORA-02000 to ORA-04999
        • ORA-05000 to ORA-10000
        • ORA-10000 to ORA-19999
        • ORA-20000 to ORA-29999
        • ORA-30000 to ORA-49999
        • ORA-50000 to ORA-99999
        • PLS-00000 to PLS-00999
      • Reserved keywords (MySQL mode)
      • Reserved keywords (Oracle mode)
  • Develop
    • Developer guide (MySQL mode)
      • Connect to OceanBase Database
        • Overview
        • Connect to an OceanBase Database tenant by using a MySQL client
        • Connect to an OceanBase Database tenant by using OBClient
        • Connect to OceanBase Database by using ODC
      • Application development
        • Java
          • Java APIs
          • Connect Java applications to OceanBase Database
        • Python applications
        • Connect C applications to OceanBase Database
      • Create and manage database objects
        • About DDL statements
        • View the currently connected database
        • Change the password of a user
        • Data type
          • Common data types
          • Unsupported data types
        • Create database objects by using ODC
          • Create a table in ODC
          • Create a view in ODC
          • Create a function in ODC
          • Create a stored procedure in ODC
        • Create and manage tables
          • About tables
          • Create a table
          • About auto-increment columns
          • About types of column constraints
          • About table structure modification
          • About table clearing
          • About table dropping
          • Flash back a dropped table
          • About table privileges
        • Create and manage partition tables
          • About partitioned tables
          • Create a partitioned table
          • Manage a partitioned table
          • Create a subpartitioned table
          • Manage a subpartitioned table
          • Partition routing
          • Indexes on partitioned tables
          • Suggestions on using partitioned tables
        • Create and manage indexes
          • Overview
          • Create an index
          • Drop an index
        • Create and manage table groups
          • Overview
          • Create table groups
            • Create a non-partitioned table group
            • Create a subpartitioned table group
          • Specify a table group when creating a table
          • View information about a table group
          • Add a table to a table group
          • Drop a table group
        • Create and manage views
          • About views
          • Create a view
          • Modify a view
          • Drop a view
        • Create and manage sequences
          • About sequences
          • Create a sequence
          • Modify a sequence
          • Drop a sequence
        • Create and manage triggers
          • About triggers
          • Create a trigger
          • Drop a trigger
      • Query
        • Overview of queries
        • Run queries in ODC
        • Single-table queries
        • WHERE queries
        • ORDER BY queries
        • GROUP BY queries
        • Use the LIMIT clause in queries
        • Multi-table join queries
          • Multi-table join queries
          • INNER JOIN queries
          • OUTER JOIN queries
          • Subqueries
        • Use operators and functions in a query
          • Use arithmetic operators in queries
          • Use numerical functions in queries
          • Use string concatenation functions in queries
          • Use string functions in queries
          • Use date and time functions in queries
          • Use type conversion functions in queries
          • Use aggregate functions in queries
          • Use NULL-related functions in queries
          • Use the CASE conditional operator in queries
          • Use the SELECT FOR UPDATE statement to lock query results
        • Execution plan
          • View an execution plan
          • Understand an execution plan
        • Use SQL hints in queries
        • Variables of query timeout
      • DML statements and transactions
        • DML statements
          • About DML statements
          • About the INSERT statement
          • UPDATE statements
          • About the DELETE statement
          • About the REPLACE INTO statement
        • Transactions
          • About transaction control statements
          • Start a transaction
          • Transaction savepoints
          • Commit a transaction
          • Roll back a transaction
          • About transaction timeout
    • Developer guide (Oracle mode)
      • Connect to OceanBase Database
        • Overview
        • Connect to an OceanBase Database tenant by using OBClient
        • Connect to OceanBase Database by using ODC
      • Application development
        • Java
          • OceanBase Connector/J
          • Java APIs
          • Connect Java applications to OceanBase Database
        • Python
          • OceanBase Connector/J in Python
          • Python APIs
          • Connect Python applications to OceanBase Database
        • C
          • OBCI
          • OBCI APIs
          • Connect C applications to OceanBase Database
      • Create and manage database objects
        • DDL statements
        • View the currently connected database
        • Change the password of a user
        • Create database objects by Using ODC
          • Create tables, views, functions, and stored procedures in ODC
          • Create a trigger in ODC
          • Create a sequence in ODC
          • Create a program package in ODC
          • Create a synonym in ODC
          • Create a type in ODC
        • Data type
          • Data types
          • Unsupported data types
        • Create and manage tables
          • Overview
          • Create a table
          • Define an auto-increment column by using the SEQUENCE keyword
          • Types of column constraints
          • Modify the structure of a table
          • Clear a table
          • Drop a table
          • Flash back a dropped table
          • Table privileges
        • Create and manage partition tables
          • Overview
          • Create a partitioned table
          • Manage a partitioned table
          • Create a subpartitioned table
          • Manage a subpartitioned table
          • Partition routing
          • Indexing on partitioned tables
          • Recommendations for using partitioned tables
        • Create and manage indexes
          • Drop an index
          • Overview
          • Create an index
        • Create and manage table groups
          • Overview
          • Create table groups
            • Create a non-partitioned table group
            • Create a subpartitioned table group
          • Specify a table group when creating a table
          • View information about a table group
          • Add a table to a table group
          • Drop a table group
        • Create and manage views
          • About views
          • Create a view
          • Modify a view
          • Drop a view
        • Create and manage sequences
          • Overview
          • Create a sequence
          • Modify a sequence
          • Drop a sequence
        • Create and manage synonyms
          • Overview
          • Create a synonym
          • Drop a synonym
        • Create and manage triggers
          • Overview
          • Create a trigger
          • Modify a trigger
          • Drop a trigger
          • Enable or disable a trigger
      • Query
        • About queries
        • Run queries in ODC
        • Single-table queries
        • Conditional queries
        • ORDER BY queries
        • GROUP BY queries
        • Use Row_Limiting_Clause in queries
        • Multi-table join queries
          • Multi-table join queries
          • INNER JOIN queries
          • OUTER JOIN queries
          • Subqueries
        • Use operators and functions in a query
          • Use arithmetic operators in queries
          • Use numerical functions in queries
          • Use string connectors in queries
          • Use string functions in queries
          • Use datetime functions in queries
          • Use type conversion functions in queries
          • Use aggregate functions in queries
          • Use NULL-related functions in queries
          • Use CASE functions in queries
          • Use the SELECT FOR UPDATE statement to lock query results
        • Execution plan
          • View execution plans of queries
          • Understand execution plans
        • Use SQL hints in queries
        • About query timeout variables
      • DML statements and transactions
        • DML statements
          • About DML statements
          • About the INSERT statement
          • About the UPDATE statement
          • About the MERGE statement
          • About the DELETE statement
        • Transactions
          • About transaction control statements
          • Start a transaction
          • Transaction savepoints
          • Commit a transaction
          • Roll back a transaction
          • About transaction timeout
    • Data migration
      • About data migration and synchronization
      • Migrate data by using OMS
      • Export and import data by using ODC
        • Overview
        • Export and import file formats
        • Batch export and import
        • Single table export and import
      • Migrate data by using SQL scripts
        • Common SQL scripts for data migration
        • Export data by using OUTFILE statements
        • Export data by using the LOAD DATA statement
      • Migrate data by using mysqldump
      • Migrate data by using OBLOADER & OBDUMPER
        • Import data by using OBLOADER
        • Export data by using OBDUMPER
      • Migrate data by using DataX
        • DataX
        • Examples of using DataX in OceanBase Database
    • Design conventions and constraints
      • Object naming conventions
        • Overview
        • Tenant naming conventions
        • User naming conventions
        • Table naming conventions
        • Field naming conventions
        • Other naming conventions
      • Object structure conventions
        • Field design
        • Table structure design
        • Partitioned table design
        • Index design
        • Other structural designs
      • Character set specifications
      • Database connection specifications
      • Best practices for database design
        • Configuration example (database connection pool)
          • Overview of database connection pool configuration
          • Example of configuring a Tomcat connection pool
          • Example of configuring a C3P0 connection pool
          • Example of configuring a Proxool connection pool
          • Example of configuring a HiKariCP connection pool
          • Example of configuring a DBCP connection pool
          • CommonPool configuration example
          • Example of configuring a JDBC connection pool
        • Development framework connection example
          • SpringBoot connection example
          • SpringBatch connection example
          • SpringJDBC connection example
          • SpringJPA connection example
          • Hibernate connection example
          • MyBatis connection example
        • Use of table comments
        • ORM conventions
        • Exception handling
    • SQL syntax
      • System tenant
        • Overview
        • ALTER SYSTEM
          • BACKUP
          • BALANCE TASK
          • BOOTSTRAP
          • CANCEL MIGRATE UNIT
          • CHANGE TENANT
          • CLUSTER
          • CONVERT
          • DELETE BACKUPSET
          • DELETE OBSOLETE BACKUP
          • FAILOVER
          • FLUSH PLAN CACHE
          • JOB
          • MERGE
          • MIGRATE UNIT
          • PARAMETER
          • REFRESH
          • REPLICA
          • RESTORE
          • ROOTSERVICE
          • SERVER
          • SET STANDBY CLUSTER
          • SWITCHOVER
          • THROTTLE
          • UPGRADE
          • VALIDATE
          • ZONE
        • ALTER RESOURCE POOL
        • ALTER RESOURCE UNIT
        • ALTER TENANT
        • CREATE RESOURCE POOL
        • CREATE RESOURCE UNIT
        • CREATE TENANT
        • DROP RESOURCE POOL
        • DROP RESOURCE UNIT
        • DROP TENANT
        • SET DECRYPTION
        • SET ENCRYPTION
      • User tenants (MySQL mode)
        • Elements
          • Data type
            • Overview
            • Numeric data types
              • Overview
              • Integer data types
              • Fixed-point data types
              • Floating-point data types
              • Bit value data type
            • Date and time data types
              • Overview
              • DATE, DATETIME, and TIMESTAMP types
              • TIME type
              • YEAR type
            • Character data types
              • Overview
              • CHAR and VARCHAR
              • BINARY and VARBINARY
            • BLOB and TEXT data types
              • Overview
              • BLOB types
              • TEXT types
            • ENUM data type
            • SET data type
            • JSON data types
              • Overview
              • Create a JSON value
              • Query and modify JSON values
              • Convert a JSON data type
            • Spatial data types
              • Overview
              • SRS
              • Create a spatial column
              • Create a spatial index
              • Spatial data formats
          • Expressions
            • Overview
            • Expression syntax
            • Convert data types in expression evaluation
          • Character sets and collations
            • Overview
            • Character sets
            • Collations
            • Database-level character sets and collations
            • Table-level character sets and collations
            • Column-level character sets and collations
            • Character sets and collations for character expressions
            • Character sets and collations for client connection
          • Literals
            • Overview
            • Strings
            • Numbers
            • Datetime values
            • Bit values
            • Boolean values
            • NULLs
          • Schema object names
          • User-defined variables
          • Comments
        • Operators
          • Overview
          • Operator precedence
          • Arithmetic operators
          • Bitwise operators
          • Comparison operators
          • Logical operators
          • Assignment operators
          • Date and time operators
          • Concatenation operators
          • BINARY operator
          • CASE conditional operator
        • Sequence pseudocolumns
        • Functions
          • Overview
          • Single-row functions
            • Date and time functions
              • ADDDATE
              • CONVERT_TZ
              • CURDATE
              • CURRENT_DATE
              • CURRENT_TIME
              • CURRENT_TIMESTAMP
              • CURTIME
              • DATE
              • DATE_ADD
              • DATE_FORMAT
              • DATE_SUB
              • DATEDIFF
              • DAYOFMONTH
              • DAYOFWEEK
              • DAYOFYEAR
              • EXTRACT
              • FROM_DAYS
              • FROM_UNIXTIME
              • GET_FORMAT
              • HOUR
              • LAST_DAY
              • LOCALTIME
              • LOCALTIMESTAMP
              • MAKEDATE
              • MAKETIME
              • MICROSECOND
              • MINUTE
              • MONTH
              • MONTHNAME
              • NOW
              • PERIOD_ADD
              • PERIOD_DIFF
              • QUARTER
              • SEC_TO_TIME
              • SECOND
              • STR_TO_DATE
              • SUBDATE
              • SUBTIME
              • SYSDATE
              • TIME
              • TIME_FORMAT
              • TIME_TO_SEC
              • TIME_TO_USEC
              • TIMEDIFF
              • TIMESTAMP
              • TIMESTAMPADD
              • TIMESTAMPDIFF
              • TO_DAYS
              • TO_SECONDS
              • UNIX_TIMESTAMP
              • USEC_TO_TIME
              • UTC_DATE
              • UTC_TIME
              • UTC_TIMESTAMP
              • WEEK
              • WEEKDAY
              • WEEKOFYEAR
              • YEARWEEK
              • YEAR
              • DAY
            • String functions
              • ASCII
              • BIN
              • BIT_LENGTH
              • CHAR
              • CHAR_LENGTH
              • CONCAT
              • CONCAT_WS
              • EXPORT_SET
              • ELT
              • FIELD
              • FIND_IN_SET
              • FORMAT
              • HEX
              • INSERT
              • INSTR
              • INT2IP
              • IP2INT
              • LCASE
              • LEFT
              • LENGTH
              • LOCATE
              • LOWER
              • LPAD
              • LTRIM
              • MAKE_SET
              • MID
              • OCT
              • ORD
              • POSITION
              • QUOTE
              • REGEXP
              • REGEXP_INSTR
              • REGEXP_LIKE
              • REGEXP_REPLACE
              • REGEXP_SUBSTR
              • REPEAT
              • REPLACE
              • REVERSE
              • RIGHT
              • RLIKE
              • RPAD
              • RTRIM
              • SPACE
              • STRCMP
              • SUBSTR
              • SUBSTRING
              • SUBSTRING_INDEX
              • TRIM
              • UCASE
              • UNHEX
              • UPPER
              • WEIGHT_STRING
              • TO_BASE64
              • FROM_BASE64
            • Conversion functions
              • CAST
              • CONVERT
            • Mathematical functions
              • ABS
              • ACOS
              • ASIN
              • ATAN
              • ATAN2
              • BIT_COUNT
              • CEIL
              • CEILING
              • CONV
              • COS
              • COT
              • CRC32
              • DEGREES
              • EXP
              • FLOOR
              • LN
              • LOG
              • LOG10
              • LOG2
              • MOD
              • NEG
              • PI
              • POW
              • POWER
              • RADIANS
              • RAND
              • ROUND
              • SIGN
              • SIN
              • SQRT
              • TAN
              • TRUNCATE
            • Comparison functions
              • GREATEST
              • INTERVAL
              • ISNULL
              • LEAST
            • Process control functions
              • IF
              • IFNULL
              • NULLIF
              • ORA_DECODE
          • Aggregate functions
            • APPROX_COUNT_DISTINCT
            • AVG
            • BIT_AND
            • BIT_OR
            • BIT_XOR
            • COUNT
            • GROUP_CONCAT
            • GROUPING
            • MAX
            • MIN
            • STD
            • STDDEV
            • STDDEV_POP
            • STDDEV_SAMP
            • SUM
            • VAR_POP
            • VAR_SAMP
            • VARIANCE
          • Analytic functions
            • APPROX_COUNT_DISTINCT
            • AVG
            • COUNT
            • CUME_DIST
            • DENSE_RANK
            • FIRST_VALUE
            • LAG
            • LAST_VALUE
            • LEAD
            • MAX
            • MIN
            • NTH_VALUE
            • NTILE
            • PERCENT_RANK
            • RANK
            • ROW_NUMBER
            • STD
            • STDDEV
            • STDDEV_POP
            • STDDEV_SAMP
            • SUM
            • VAR_POP
            • VAR_SAMP
            • VARIANCE
          • Encryption functions
            • AES_DECRYPT
            • AES_ENCRYPT
            • MD5
          • Information functions
            • BENCHMARK
            • CHARSET
            • COERCIBILITY
            • COLLATION
            • CONNECTION_ID
            • CURRENT_USER
            • DATABASE
            • FOUND_ROWS
            • LAST_INSERT_ID
            • SCHEMA
            • ROW_COUNT
            • SESSION_USER
            • SYSTEM_USER
            • USER
            • VERSION
            • OB_VERSION
          • JSON functions
            • Functions that create JSON values
              • JSON_ARRAY
              • JSON_OBJECT
              • JSON_QUOTE
            • Functions that search JSON values
              • JSON_CONTAINS
              • JSON_CONTAINS_PATH
              • JSON_EXTRACT
              • JSON_KEYS
              • JSON_OVERLAPS
              • JSON_SEARCH
              • JSON_VALUE
              • MEMBER OF
            • Functions that modify JSON values
              • JSON_ARRAY_APPEND
              • JSON_ARRAY_INSERT
              • JSON_INSERT
              • JSON_MERGE
              • JSON_MERGE_PATCH
              • JSON_MERGE_PRESERVE
              • JSON_REMOVE
              • JSON_REPLACE
              • JSON_SET
              • JSON_UNQUOTE
            • Functions that return JSON text attributes
              • JSON_DEPTH
              • JSON_LENGTH
              • JSON_TYPE
              • JSON_VALID
            • JSON utility functions
              • JSON_PRETTY
              • JSON_STORAGE_SIZE
            • JSON aggregate functions
              • JSON_ARRAYAGG
              • JSON_OBJECTAGG
          • Other functions
            • ANY_VALUE
            • COALESCE
            • DEFAULT
            • INET_ATON
            • INET_NTOA
            • INET6_ATON
            • INET6_NTOA
            • IS_IPV4
            • IS_IPV4_COMPAT
            • IS_IPV4_MAPPED
            • IS_IPV6
            • NVL
            • SLEEP
            • UUID
            • UUID_SHORT
            • VALUES
          • Spatial functions
            • Create a geometric function
            • Spatial operation functions
            • Spatial relation functions
            • Geometry property functions
            • Geometric format conversion functions
        • Queries and subqueries
          • Overview
          • Subqueries
          • JOIN
        • SQL statements
          • General syntax
          • CTE
          • ALTER DATABASE
          • ALTER OUTLINE
          • ALTER SEQUENCE
          • ALTER TABLE
          • ALTER TABLEGROUP
          • ALTER USER
          • ALTER VIEW
          • ANALYZE
          • CREATE DATABASE
          • CREATE INDEX
          • CREATE OUTLINE
          • CREATE RESTORE POINT
          • CREATE SEQUENCE
          • CREATE TABLE
          • CREATE TABLEGROUP
          • CREATE USER
          • CREATE VIEW
          • DEALLOCATE PREPARE
          • DELETE
          • DESCRIBE
          • DROP DATABASE
          • DROP INDEX
          • DROP OUTLINE
          • DROP RESTORE POINT
          • DROP TABLE
          • DROP TABLEGROUP
          • DROP SEQUENCE
          • DROP USER
          • DROP VIEW
          • EXECUTE
          • EXPLAIN
          • FLASHBACK
          • GRANT
          • HELP
          • INSERT
          • KILL
          • LOAD DATA
          • OPTIMIZE
          • PREPARE
          • PURGE
          • PURGE RECYCLEBIN
          • RENAME TABLE
          • RENAME USER
          • REPLACE
          • REVOKE
          • SAVEPOINT
          • SCHEMA
          • SELECT
            • SELECT
            • JOIN clause
            • OVER clause
            • UNION clause
          • SELECT INTO
          • SET
          • SET CHARSET
          • SET NAMES
          • SET PASSWORD
          • SET TRANSACTION
          • SHOW
          • TRANSACTION
          • TRUNCATE TABLE
          • UPDATE
          • USE
      • User tenants (Oracles mode)
        • SQL overview
        • Pseudocolumns
          • Overview
          • Hierarchical query pseudocolumns
          • Sequence pseudocolumns
          • ORA_ROWSCN pseudocolumn
          • ROWNUM pseudocolumn
          • ROWID pseudocolumn
        • Elements
          • Built-in data types
            • Overview of built-in data types
            • Character data types
              • Overview of character data types
              • CHAR data type
              • NCHAR data type
              • NVARCHAR2 data type
              • VARCHAR2 data type
              • VARCHAR data type
            • Numeric data types
              • Overview
              • NUMBER data type
              • FLOAT data type
              • Floating-point numbers
              • Precedence of numeric data types
            • Date, time, and interval data types
              • Overview of datetime and interval data types
              • DATE data type
              • TIMESTAMP data type
              • TIMESTAMP WITH TIME ZONE date type
              • TIMESTAMP WITH LOCAL TIME ZONE data type
              • INTERVAL YEAR TO MONTH data type
              • INTERVAL DAY TO SECOND data type
              • Calculation of dates, timestamps, and intervals
            • RAW data type
            • Large object data types
              • Overview
              • BLOB data type
              • CLOB data type
            • Rowid data types
            • User-defined data types
          • Comparison rules of data types
            • Overview
            • Numeric value comparison rules
            • Date value comparison rules
            • Character value comparison rules
            • Data type precedence
            • Data type conversion rules
            • Security considerations for data conversion
          • Literals
            • Overview
            • Text literals
            • Numeric literals
            • Datetime literals
              • Date literals
              • Timestamp literals
            • Interval literals
          • Format models
            • Overview
            • Number format models
            • Datetime format models
            • RR datetime format element
            • String-to-date conversion rules
          • Null values
            • Overview of nulls
            • Nulls in SQL functions
            • Nulls in comparison conditions
            • Nulls in conditional expressions
          • Comments
            • Overview
            • Comments within SQL statements
            • Comments on schema and nonschema objects
            • Hint
              • Overview of hints
              • Lists of hints
                • Hints related to access path
                • Hints related to join orders
                • Hints related to joins
                • Hints related to parallel execution
                • Hints related to query strategy
                • Hints related to query conversion
                • Other hints
          • Database objects
            • Schema objects
            • Non-schema objects
          • Database naming conventions
            • Overview
            • Database object names and qualifiers
            • Suggestions on schema object names
          • Methods of referencing database objects
            • Overview
            • Reference schema objects
            • Reference objects in a remote database
              • Create database links
              • Reference database links
            • Reference partition tables and indexes
            • Reference an attribute or method of an object type
        • Operators
          • Overview of operators
          • Operator precedence
          • Arithmetic operators
          • Concatenation operator
          • Hierarchical query operators
          • Set operators
          • COLLATE operator
        • Functions
          • Function overview
          • Single-row functions
            • Numeric functions
              • ABS
              • ACOS
              • ASIN
              • ATAN
              • ATAN2
              • BITAND
              • CEIL
              • COS
              • COSH
              • EXP
              • FLOOR
              • LN
              • LOG
              • MOD
              • NANVL
              • POWER
              • REMAINDER
              • ROUND
              • SIGN
              • SIN
              • SINH
              • SQRT
              • TAN
              • TANH
              • TRUNC
              • WIDTH_BUCKET
            • String functions that return strings
              • CHR
              • CONCAT
              • INITCAP
              • LOWER
              • LPAD
              • LTRIM
              • NLS_LOWER
              • NLS_UPPER
              • REGEXP_REPLACE
              • REGEXP_SUBSTR
              • REPLACE
              • RPAD
              • RTRIM
              • SUBSTR
              • TRANSLATE
              • TRANSLATE ... USING
              • TRIM
              • UPPER
            • String functions that return numbers
              • ASCII
              • INSTR
              • LENGTH
              • REGEXP_COUNT
              • REGEXP_INSTR
            • Datetime functions
              • ADD_MONTHS
              • CURRENT_DATE
              • CURRENT_TIMESTAMP
              • DBTIMEZONE
              • EXTRACT (datetime)
              • FROM_TZ
              • LAST_DAY
              • LOCALTIMESTAMP
              • MONTHS_BETWEEN
              • NEXT_DAY
              • NUMTODSINTERVAL
              • NUMTOYMINTERVAL
              • ROUND (date)
              • SESSIONTIMEZONE
              • SYS_EXTRACT_UTC
              • SYSDATE
              • SYSTIMESTAMP
              • TO_CHAR (datetime)
              • TO_DSINTERVAL
              • TO_TIMESTAMP
              • TO_TIMESTAMP_TZ
              • TO_YMINTERVAL
              • TRUNC (date)
              • TZ_OFFSET
            • General comparison functions
              • GREATEST
              • LEAST
            • Conversion functions
              • ASCIISTR
              • CAST
              • CHARTOROWID
              • CONVERT
              • HEXTORAW
              • NUMTODSINTERVAL
              • NUMTOYMINTERVAL
              • RAWTOHEX
              • ROWIDTOCHAR
              • ROWIDTONCHAR
              • TO_BINARY_DOUBLE
              • TO_BINARY_FLOAT
              • TO_BLOB
              • TO_CHAR (character)
              • TO_CHAR (datetime)
              • TO_CHAR (number)
              • TO_CLOB
              • TO_DATE
              • TO_DSINTERVAL
              • TO_MULTI_BYTE
              • TO_NUMBER
              • TO_NCHAR (character)
              • TO_NCHAR (datetime)
              • TO_NCHAR (number)
              • TO_SINGLE_BYTE
              • TO_TIMESTAMP
              • TO_TIMESTAMP_TZ
              • TO_YMINTERVAL
              • UNISTR
            • Encoding and decoding functions
              • DECODE
              • DUMP
              • ORA_HASH
              • VSIZE
            • Null value-related functions
              • COALESCE
              • LNNVL
              • NANVL
              • NULLIF
              • NVL
              • NVL2
            • Environment and identifier functions
              • SYS_CONTEXT
              • SYS_GUID
              • UID
              • USER
              • USERENV
              • OB_VERSION
            • Hierarchical functions
              • SYS_CONNECT_BY_PATH
            • XML functions
              • XMLAGG
              • XMLATTRIBUTES
              • XMLELEMENT
              • XMLPARSE
          • Aggregate functions
            • APPROX_COUNT_DISTINCT
            • AVG
            • CORR
            • COUNT
            • COVAR_POP
            • COVAR_SAMP
            • CUME_DIST
            • DENSE_RANK
            • GROUPING
            • KEEP
            • LISTAGG
            • MAX
            • MEDIAN
            • MIN
            • PERCENT_RANK
            • PERCENTILE_CONT
            • PERCENTILE_DISC
            • RANK
            • REGR_ (Linear Regression) Functions
            • ROLLUP
            • STDDEV
            • STDDEV_POP
            • STDDEV_SAMP
            • SUM
            • VAR_POP
            • VAR_SAMP
            • VARIANCE
            • WMSYS.WM_CONCAT/WM_CONCAT
          • Analytic functions
            • Analytic functions
            • AVG
            • CORR
            • COUNT
            • COVAR_POP
            • COVAR_SAMP
            • CUME_DIST
            • DENSE_RANK
            • FIRST_VALUE
            • KEEP
            • LAG
            • LAST_VALUE
            • LEAD
            • LISTAGG
            • MAX
            • MEDIAN
            • MIN
            • NTILE
            • NTH_VALUE
            • PERCENT_RANK
            • PERCENTILE_CONT
            • PERCENTILE_DISC
            • RANK
            • RATIO_TO_REPORT
            • REGR_ (Linear Regression) Functions
            • ROW_NUMBER
            • STDDEV
            • STDDEV_POP
            • STDDEV_SAMP
            • SUM
            • VAR_POP
            • VAR_SAMP
            • VARIANCE
            • WMSYS.WM_CONCAT/WM_CONCAT
        • Expressions
          • Overview
          • Simple expressions
          • Compound expressions
          • Case expressions
          • Column expressions
          • CURSOR expressions
          • Datetime expressions
          • Function expressions
          • Interval expressions
          • Scalar subquery expressions
          • Type constructor expressions
          • Expression list
        • Conditions
          • Overview of SQL conditions
          • Condition precedence
          • Comparison conditions
          • Floating-point conditions
          • Logical conditions
          • Pattern-matching conditions
          • Null conditions
          • Compound conditions
          • BETWEEN condition
          • EXISTS condition
          • IN condition
        • Queries and subqueries
          • Overview of queries and subqueries
          • Simple query
          • Hierarchical query
          • Compound queries
          • Join queries
          • Subquery
          • DUAL table query
        • SQL statements
          • DDL
            • ALTER INDEX
            • ALTER KEYSTORE
            • ALTER OUTLINE
            • ALTER PROFILE
            • ALTER ROLE
            • ALTER SEQUENCE
            • ALTER SESSION
            • ALTER SYSTEM FLUSH PLAN CACHE
            • ALTER SYSTEM PARAMETER
            • ALTER TABLE
            • ALTER TABLEGROUP
            • ALTER USER
            • CREATE DIRECTORY
            • CREATE DATABASE LINK
            • CREATE INDEX
            • CREATE KEYSTORE
            • CREATE OUTLINE
            • CREATE PROFILE
            • CREATE RESTORE POINT
            • CREATE ROLE
            • CREATE SEQUENCE
            • CREATE SYNONYM
            • CREATE TABLE
            • CREATE TABLEGROUP
            • CREATE TABLESPACE
            • CREATE USER
            • CREATE VIEW
            • DROP DIRECTORY
            • DROP DATABASE LINK
            • DROP INDEX
            • DROP OUTLINE
            • DROP PROFILE
            • DROP RESTORE POINT
            • DROP ROLE
            • DROP SEQUENCE
            • DROP SYNONYM
            • DROP TABLE
            • DROP TABLEGROUP
            • DROP TABLESPACE
            • DROP USER
            • DROP VIEW
            • RENAME
            • TRUNCATE TABLE
          • DML
            • DELETE
            • INSERT
            • MERGE
            • PURGE
            • SELECT
              • SIMPLE SELECT
              • Set-based SELECT
              • WITH clause
            • UPDATE
          • DCL
            • ANALYZE
            • AUDIT
            • COMMENT
            • COMMIT
            • EXPLAIN
            • FLASHBACK TABLE BEFORE DROP
            • GRANT
            • KILL
            • REVOKE
            • ROLLBACK
            • SAVEPOINT
            • SET NAMES
            • SET PASSWORD
            • SET ROLE
            • SET VARIABLE
            • SHOW
            • SHRINK
            • TRANSACTION
    • PL reference
      • What is PL?
        • Overview
        • Main features of PL
        • PL architecture
      • PL reference (MySQL mode)
        • Syntax of PL stored programs
        • Stored programs
          • Overview
          • Variables in stored programs
          • Stored procedures
          • Stored functions
          • Triggers
          • Access control and account management
          • Limitations on stored programs
        • Cursors
          • Overview
          • Cursor execution process
          • Limitations on server cursors
        • Conditional control statements
          • CASE
          • IF
          • ITERATE
          • LEAVE
          • LOOP
          • REPEAT
          • RETURN
          • WHILE
        • Data manipulation statements
          • CALL
          • DO
        • Data definition statements
          • CREATE FUNCTION
          • CREATE PROCEDURE
          • CREATE TRIGGER
          • DROP FUNCTION
          • DROP PROCEDURE
          • DROP TRIGGER
        • Database management statements
          • SHOW CREATE FUNCTION
          • SHOW CREATE PROCEDURE
          • SHOW CREATE TRIGGER
          • SHOW FUNCTION STATUS
          • SHOW PROCEDURE STATUS
          • SHOW TRIGGERS
        • Dictionary view
          • INFORMATION_SCHEMA PARAMETERS
          • INFORMATION_SCHEMA ROUTINES
          • INFORMATION_SCHEMA TRIGGERS
        • Exception handling
          • Overview
          • DECLARE ... CONDITION
          • DECLARE ... HANDLER
          • GET DIAGNOSTICS
          • RESIGNAL
          • SIGNAL
          • Effective scope of an exception handler
          • Diagnostics area
          • Exception handling and OUT/INOUT parameters
          • Limitations on exception handling
        • PL packages
          • DBMS_RESOURCE_MANAGER
            • Overview
            • CREATE_CONSUMER_GROUP
            • CREATE_PLAN
            • CREATE_PLAN_DIRECTIVE
            • DELETE_CONSUMER_GROUP
            • DELETE_PLAN
            • DELETE_PLAN_DIRECTIVE
            • SET_CONSUMER_GROUP_MAPPING
            • UPDATE_PLAN_DIRECTIVE
          • DBMS_STATS
            • Overview
            • DELETE_COLUMN_STATS
            • DELETE_TABLE_STATS
            • EXPORT_COLUMN_STATS
            • EXPORT_TABLE_STATS
            • FLUSH_DATABASE_MONITORING_INFO
            • GATHER_TABLE_STATS
            • IMPORT_COLUMN_STATS
            • IMPORT_TABLE_STATS
            • LOCK_PARTITION_STATS
            • LOCK_SCHEMA_STATS
            • LOCK_TABLE_STATS
            • SET_COLUMN_STATS
            • SET_TABLE_STATS
            • UNLOCK_PARTITION_STATS
            • UNLOCK_SCHEMA_STATS
            • UNLOCK_TABLE_STATS
        • Reserved and non-reserved PL keywords
      • PL reference (Oracle mode)
        • Language basics
          • Character sets
          • Lexical units
          • Declaration
          • Reference identifiers
          • Scope and visibility of identifiers
          • Assign values
          • Expressions
          • PL blocks
          • Subprograms
          • Error-reporting functions
        • Data types
          • Overview
          • SQL data types
          • LOB data types
          • BOOLEAN type
          • User-defined subtypes
          • PLS_INTEGER and BINARY_INTEGER
          • Arrays
        • Flow control
          • Overview
          • Conditional control
          • Loop control
          • Sequential control
        • Collections and records
          • Overview
          • Collections
          • Associative arrays
          • Varrays
          • Nested tables
          • Collection constructor function
          • Collection methods
            • Overview of collection methods
            • DELETE method
            • TRIM method
            • EXTEND method
            • EXISTS method
            • FIRST and LAST methods
            • COUNT method
            • LIMIT method
            • PRIOR and NEXT methods
          • Records
          • Insert records into a table and update a table by using records
          • Create and call a subprogram with record type parameters
        • Static SQL
          • Overview
          • Cursors
            • Overview
            • Cursor attributes
            • Implicit cursors
            • Explicit cursors
            • Cursor variables
            • Traverse cursor data by using the FOR loop
            • Modify and drop a cursor
          • Transaction processing and control
          • Autonomous transactions
            • Overview
            • Control autonomous transactions
            • Autonomous triggers
        • Dynamic SQL
          • Overview
          • Execute dynamic SQL statements
          • DBMS_SQL system package
        • Stored procedures and functions
          • Overview
          • Create a stored procedure
          • Create a function
          • Manage stored procedures and functions
          • Privilege control
          • User-defined aggregate functions
            • Overview
            • Interface for user-defined aggregate functions
            • Create user-defined aggregate functions
            • Use user-defined aggregate functions
        • Triggers
          • Overview
          • Create a DML trigger
          • Modify and drop a trigger
          • Disable or enable a trigger
          • Query trigger information
          • INSTEAD OF DML trigger
        • Packages
          • Overview
          • Create a program package
          • Overloaded programs in a package
          • Manage program packages
          • Definition of the PL environment by the STANDARD package
        • Exception handling
          • Overview
          • Compile-Time alerts
          • Exception types
          • Exception handling processes
        • DDL operations on stored PL units
          • Overview
          • ALTER FUNCTION
          • ALTER PACKAGE
          • ALTER PROCEDURE
          • ALTER TRIGGER
          • ALTER TYPE
          • CREATE FUNCTION
          • CREATE PACKAGE
          • CREATE PACKAGE BODY
          • CREATE PROCEDURE
          • CREATE TRIGGER
          • CREATE TYPE
          • CREATE TYPE BODY
          • DROP FUNCTION
          • DROP PACKAGE
          • DROP PROCEDURE
          • DROP TRIGGER
          • DROP TYPE
          • DROP TYPE BODY
        • PL packages
          • Overview
          • DBMS_APPLICATION_INFO
            • Overview
            • READ_CLIENT_INFO
            • READ_MODULE
            • SET_ACTION
            • SET_CLIENT_INFO
            • SET_MODULE
          • DBMS_CRYPTO
            • Overview
            • ENCRYPT
            • DECRYPT
            • HASH
          • DBMS_DEBUG
            • Overview
            • ATTACH_SESSION
            • CONTINUE
            • DEBUG_ON
            • DEBUG_OFF
            • DETACH_SESSION
            • DELETE_BREAKPOINT
            • DISABLE_BREAKPOINT
            • ENABLE_BREAKPOINT
            • GET_VALUE
            • GET_VALUES
            • GET_RUNTIME_INFO
            • GET_TIMEOUT_BEHAVIOUR
            • INITIALIZE
            • PROBE_VERSION
            • PRINT_BACKTRACE
            • SET_TIMEOUT
            • SET_TIMEOUT_BEHAVIOUR
            • SET_BREAKPOINT
            • SHOW_BREAKPOINTS
          • DBMS_DESCRIBE
            • Overview
            • DESCRIBE_PROCEDURE
          • DBMS_JOB
            • Overview
            • BROKEN
            • CHANGE
            • ZONE
            • INTERVAL
            • NEXT_DATE
            • REMOVE
            • RUN
            • SUBMIT
            • USER_EXPORT
            • WHAT
          • DBMS_LOB
            • Overview
            • APPEND
            • CLOSE
            • COMPARE
            • COPY
            • CREATETEMPORARY
            • ERASE
            • FREETEMPORARY
            • GETLENGTH
            • ISOPEN
            • INSTR
            • OPEN
            • READ
            • SUBSTR
            • TRIM
            • WRITE
            • WRITEAPPEND
          • DBMS_LOCK
            • Overview
            • SLEEP
          • DBMS_METADATA
            • Overview
            • GET_DDL
          • DBMS_OUTPUT
            • Overview
            • DISABLE
            • ENABLE
            • GET_LINE
            • GET_LINES
            • NEW_LINE
            • PUT
            • PUT_LINE
          • DBMS_PLAN_CACHE
            • Overview
            • PURGE
          • DBMS_RANDOM
            • Overview
            • INITIALIZE
            • NORMAL
            • RANDOM
            • SEED
            • STRING
            • TERMINATE
            • VALUE
          • DBMS_RESOURCE_MANAGER
            • Overview
            • CREATE_CONSUMER_GROUP
            • CREATE_PLAN
            • CREATE_PLAN_DIRECTIVE
            • DELETE_CONSUMER_GROUP
            • DELETE_PLAN
            • DELETE_PLAN_DIRECTIVE
            • SET_CONSUMER_GROUP_MAPPING
            • UPDATE_PLAN_DIRECTIVE
          • DBMS_SCHEDULER
            • Overview
            • CREATE_JOB
            • CREATE_PROGRAM
            • DEFINE_PROGRAM_ARGUMENT
            • DISABLE
            • DROP_JOB
            • DROP_PROGRAM
            • ENABLE
            • GENERATE_JOB_NAME
            • RUN_JOB
            • SET_ATTRIBUTE
            • SET_JOB_ARGUMENT_VALUE
          • DBMS_SESSION
            • Overview
            • CLEAR_ALL_CONTEXT
            • CLEAR_CONTEXT
            • CLEAR_IDENTIFIER
            • SET_CONTEXT
            • SET_IDENTIFIER
          • DBMS_SQL
            • Overview
            • BIND_VARIABLE
            • CLOSE_CURSOR
            • COLUMN_VALUE
            • DEFINE_COLUMN
            • DEFINE_ARRAY
            • DESCRIBE_COLUMNS
            • EXECUTE
            • EXECUTE_AND_FETCH
            • FETCH_ROWS
            • IS_OPEN
            • OPEN_CURSOR
            • PARSE
          • DBMS_STATS
            • Overview
            • DELETE_COLUMN_STATS
            • DELETE_TABLE_STATS
            • EXPORT_COLUMN_STATS
            • EXPORT_TABLE_STATS
            • FLUSH_DATABASE_MONITORING_INFO
            • GATHER_TABLE_STATS
            • IMPORT_COLUMN_STATS
            • IMPORT_TABLE_STATS
            • LOCK_PARTITION_STATS
            • LOCK_SCHEMA_STATS
            • LOCK_TABLE_STATS
            • SET_COLUMN_STATS
            • SET_TABLE_STATS
            • UNLOCK_PARTITION_STATS
            • UNLOCK_SCHEMA_STATS
            • UNLOCK_TABLE_STATS
          • DBMS_UTILITY
            • Overview
            • ACTIVE_INSTANCES
            • COMMA_TO_TABLE
            • CURRENT_INSTANCE
            • DB_VERSION
            • FORMAT_CALL_STACK
            • FORMAT_ERROR_BACKTRACE
            • FORMAT_ERROR_STACK
            • GET_ENDIANNESS
            • GET_HASH_VALUE
            • GET_PARAMETER_VALUE
            • GET_SQL_HASH
            • GET_TIME
            • IS_BIT_SET
            • IS_CLUSTER_DATABASE
            • NAME_RESOLVE
            • NAME_TOKENIZE
            • OLD_CURRENT_SCHEMA
            • OLD_CURRENT_USER
            • PORT_STRING
            • TABLE_TO_COMMA
          • DBMS_XA
            • Overview
            • DBMS_XA constants
            • DBMS_XA_XID object type
            • DIST_TXN_SYNC
            • XA_COMMIT
            • XA_END
            • XA_FORGET
            • XA_GETLASTOER
            • XA_PREPARE
            • XA_RECOVER
            • XA_ROLLBACK
            • XA_SETTIMEOUT
            • XA_START
          • ODCICONST
            • Overview
            • ODCIArgDesc.ArgType
            • ODCIEnv.CallProperty
            • ODCIEnv.Envflags
            • ODCIIndexAlter
            • ODCIIndexAlter parameter alter_option
            • ODCIIndexInfo.IndexInfoFlags
            • ODCIIndexInfo.IndexParaDegree
            • ODCIPredInfo.Flags
            • ODCIQueryInfo.Flags
            • ODCIStatsOptions.Flags
            • ODCIStatsOptions.Options
            • Return Status
            • ScnFlg
          • UTL_FILE
            • Overview
            • FCLOSE
            • FFLUSH
            • FOPEN
            • FGETPOS
            • FREMOVE
            • FRENAME
            • FSEEK
            • NEW_LINE
            • GET_LINE
            • PUT
            • PUT_LINE
          • UTL_ENCODE
            • Overview
            • BASE64_DECODE
            • BASE64_ENCODE
          • UTL_I18N
            • Overview
            • RAW_TO_CHAR
            • STRING_TO_RAW
          • UTL_RAW
            • Overview
            • BIT_AND
            • BIT_COMPLEMENT
            • BIT_OR
            • BIT_XOR
            • CAST_FROM_BINARY_DOUBLE
            • CAST_FROM_BINARY_FLOAT
            • CAST_FROM_BINARY_INTEGER
            • CAST_FROM_NUMBER
            • CAST_TO_BINARY_DOUBLE
            • CAST_TO_BINARY_FLOAT
            • CAST_TO_BINARY_INTEGER
            • CAST_TO_NUMBER
            • CAST_TO_NVARCHAR2
            • CAST_TO_RAW
            • CAST_TO_VARCHAR2
            • COMPARE
            • CONCAT
            • COPIES
            • LENGTH
            • REVERSE
            • SUBSTR
        • PL label security package
          • Overview of label security PL packages
          • SA_SYSDBA policy management package
            • Overview
            • SA_SYSDBA.ALTER_POLICY
            • SA_SYSDBA.CREATE_POLICY
            • SA_SYSDBA.DROP_POLICY
          • SA_COMPONENTS label component package
            • Overview
            • SA_COMPONENTS.ALTER_LEVEL
            • SA_COMPONENTS.CREATE_LEVEL
            • SA_COMPONENTS.DROP_LEVEL
          • SA_LABEL_ADMIN label management package
            • Overview
            • SA_LABEL_ADMIN.ALTER_LABEL
            • SA_LABEL_ADMIN.CREATE_LABEL
            • SA_LABEL_ADMIN.DROP_LABEL
          • SA_POLICY_ADMIN policy management package
            • Overview
            • SA_POLICY_ADMIN.APPLY_TABLE_POLICY
            • SA_POLICY_ADMIN.DISABLE_TABLE_POLICY
            • SA_POLICY_ADMIN.ENABLE_TABLE_POLICY
            • SA_POLICY_ADMIN.REMOVE_TABLE_POLICY
          • SA_USER_ADMIN user label management package
            • Overview
            • SA_USER_ADMIN.SET_LEVELS
          • SA_SESSION session management package
            • Overview
            • SA_SESSION.LABEL
            • SA_SESSION.RESTORE_DEFAULT_LABELS
            • SA_SESSION.ROW_LABEL
            • SA_SESSION.SET_LABEL
            • SA_SESSION.SET_ROW_LABEL
        • Reserved PL keywords
    • SQL practices and recommendations
      • Limits on writing SQL statements
      • SQL writing conventions
        • SELECT statements
        • DML statements
        • Multi-table join statements
        • Table scan
        • Transactions
        • Cache
        • Hint
        • Others
      • SQL statement examples
        • Implicit data type conversion
        • JOIN tables
        • Weak consistency read
        • Pagination queries
    • Common errors and solutions
      • MySQL
        • About error codes
        • Database connection error
        • Timeout errors
          • Idle session timeout
          • Transaction timeout errors
        • User errors
          • Locked user
          • Incorrect user password
        • Table errors
          • Table already exists
          • Table does not exist
          • Invalid use of NULL value
        • Constraint errors
          • Unique key conflict
          • Foreign key conflicts
        • SQL errors
          • Data inconsistency
      • Oracle
        • Overview
        • Database connection error
        • Timeout errors
          • Idle session timeout
          • Transaction timeout errors
        • User errors
          • Locked user
          • Incorrect user password
        • Object errors
          • Object already exists
          • Object does not exist
        • Constraint errors
          • Unique key conflict
          • Foreign key conflicts
        • SQL errors
          • Data type inconsistency
  • Architecture
    • Architecture of OceanBase Database
    • Development of OceanBase Database
    • Multi-tenant architecture
      • Overview
      • Compatibility modes
      • System tenants
      • User tenants
      • Tenant and resource management
        • Manage tenant resources
        • Multi-tenant resource isolation
        • Balance resource units
    • Database objects
      • Oracle mode
        • Introduction to database objects
          • Overview
          • Database object types
          • Database object storage
          • Dependencies between database objects
        • Tables
          • Overview
          • Data types
            • Overview
            • Character data types
            • Numeric data types
            • Date and time data types
            • ROWID data types
            • LOB data types
            • Format models
              • Overview
              • Number format models
              • Datetime format models
          • Integrity constraints
          • Table storage
          • Table compression
          • Partitioned tables
          • Table groups
          • Tables with and without a primary key
          • Temporary tables
        • Indexes
          • Overview of indexes
          • Local and global indexes
          • Unique and non-unique indexes
          • Index usage
          • Index storage
        • Partitions
          • Overview
          • Partition key
          • Partition types
          • Partitioned indexes
        • Views
          • Overview
          • Data manipulation in views
          • Data access from views
          • Updatable views
        • Other objects
          • Sequences
          • Synonyms
        • System views
          • Dictionary views
          • Dynamic performance views
        • Data integrity
          • Overview
          • Types of integrity constraints
            • Overview
            • NOT NULL constraints
            • UNIQUE KEY constraints
            • PRIMARY KEY constraints
            • Foreign key constraints
            • CHECK constraints
          • Use of integrity constraints
      • MySQL mode
        • Introduction to database objects
          • Overview
          • Database object types
          • Database object storage
          • Dependencies between database objects
        • Tables
          • Overview
          • Data types
            • Overview
            • Numeric data types
            • Date and time data types
            • Character data types
            • LOB data types
          • Integrity constraints
          • Table storage
          • Table compression
          • Partitioned tables
          • Table groups
          • Tables with and without a primary key
        • Indexes
          • Overview
          • Local and global indexes
          • Unique and non-unique indexes
          • Index usage
          • Index storage
        • Partitions
          • Overview
          • Partition key
          • Partitioning strategies
          • Partitioned indexes
        • Views
          • Overview
          • Data manipulation in views
          • Data access from views
          • Updatable views
        • System views
          • Dictionary views
          • Performance views
        • Data integrity
          • Overview
          • Types of integrity constraints
            • Overview
            • NOT NULL integrity constraints
            • UNIQUE KEY constraints
            • PRIMARY KEY constraints
            • Foreign key constraints
          • Use of integrity constraints
    • Distributed database objects
      • Overview
      • Cluster architecture
      • Data partitions and replicas
        • Overview
        • Partition replica types
          • Overview
          • Full-featured replicas
          • Log-only replicas
          • Encrypted voting replicas
          • Read-only replicas
        • Multi-replica consensus protocols
        • Data balancing
          • Partition replica balancing
            • Automatic load balancing
            • Table groups
          • Leader balancing
            • Automatic load balancing
            • Primary zone
      • Dynamic scaling
        • Cluster scaling
        • Tenant resource scaling
          • Overview
          • Horizontal scaling of tenant resources
          • Vertical scaling of tenant resources
          • Cross-zone management of tenant resources
    • Data link
      • Overview
      • ODP
        • Overview
        • SQL statement routing
        • Connection management
        • Configuration management
        • Logs and monitoring
      • Database drivers
        • Overview
        • OBCI
        • OceanBase Connector/J
        • OceanBase Connector/C
    • User interfaces and query languages
      • SQL
        • SQL introduction
          • SQL overview
          • SQL data access
          • SQL standards
        • SQL statement
          • Overview
          • DDL
          • DML
          • DCL
        • Execution process of SQL queries
        • SQL execution plan
        • Distributed execution plan
          • Distributed execution and parallel query
          • Generate distributed execution plans
          • Run and disable a parallel query
          • Manage distributed execution plans
          • Parameter tuning for a parallel query
      • PL
        • PL concepts
          • Oracle mode
            • Subprograms
            • Stored procedures
            • Functions
            • Triggers
            • Packages
          • MySQL mode
            • Subprograms
            • Stored procedure
            • Functions
            • Triggers
        • PL subprogram execution mechanism
      • Client programming languages
    • Transaction management
      • Transactions
        • Overview of transactions
        • Transaction structure
        • Statement-level atomicity
        • GTS
        • Transaction control
          • Overview
          • Active transactions
          • Savepoints
          • Transaction control statements
            • MySQL transaction control
            • Oracle transaction control
        • Redo logs
        • Local transactions
        • Distributed transactions
          • Overview
          • Two-phase commit
        • XA transactions
      • Transaction concurrency and consistency
        • Overview
        • Multi-version read consistency
        • Concurrency control
          • Overview
          • Lock mechanism
        • Transaction isolation levels
          • Overview
          • Oracle mode
          • MySQL mode
        • Weak consistency read
    • Storage architecture
      • Overview
      • Data storage
        • Overview
        • MemTables
        • SSTables
        • Compression and encoding
      • Minor compaction and major compaction
        • Overview
        • Minor compactions
        • Major compactions
      • Multi-level caching
      • Query processing
      • Data integrity
        • Detect silent data corruption
    • Data reliability and HA
      • HA architecture
        • Overview
        • ODP HA
        • Leader election in distributed systems
        • Multi-replica log synchronization
        • Paxos protocol
        • Automatic handling of node faults
        • GTS HA
      • Deployment solutions for disaster recovery
      • Primary/standby cluster
        • Overview
        • Typical scenarios
        • Protection modes
        • Log transfer service
        • Role switching
        • Read service of standby clusters
        • Benefits
      • Data protection
        • Overview
        • Flashback queries
        • Restore points
        • Recycle bin
      • Backup and restore
        • Overview
        • Backup metadata for restoration
        • Backup architecture
        • Restoration architecture
    • Database security
      • Overview
      • Identity authentication
      • Access control
      • Data transmission encryption
      • Data storage encryption
      • Monitoring and alerts
      • Security audit
    • OBServer architecture
      • Structure of the OBServer installation directory
      • Configuration files
      • OBServer thread model
        • Threads
        • Worker threads
        • Background threads
      • Logs
      • Memory management
        • Overview
        • Memory-related parameters
        • Memory-related internal tables
        • Memory usage logs
        • Diagnose memory errors
    • Appendix: Basic concepts of OceanBase Database
  • Releases
    • V3.2
      • OceanBase Database Enterprise Edition V3.2.4
      • OceanBase Database Enterprise Edition V3.2.3
      • OceanBase Database Enterprise Edition V3.2.2
      • OceanBase Database Enterprise Edition V3.2.1
      • OceanBase Database Enterprise Edition V3.2.0
    • V3.1
      • OceanBase Database Enterprise Edition V3.1.2
      • OceanBase Database Enterprise Edition V3.1.1
    • V2.2
      • OceanBase Database Enterprise Edition V2.2.77

Download PDF

Documentation Revision History Document Overview Overview Concepts Compatibility with MySQL Management tools Version rules Limitations Deployment introduction Deployment process HA solution for OceanBase clusters Overview Migrate data by using SQL scripts Migrate data by using mysqldump Migrate data by using DataX Migrate data by using the OUTFILE statement OverviewPhysical connections Overview of data distribution Overview Case analysis RPC connection authentication Set row-level access control Reserved keywords (MySQL mode) Reserved keywords (Oracle mode) About data migration and synchronization Migrate data by using OMS Migrate data by using mysqldump Character set specifications Database connection specifications Limits on writing SQL statementsArchitecture of OceanBase Database Development of OceanBase Database Overview Compatibility modes System tenants User tenants Overview Cluster architecture Overview Client programming languages Overview Multi-level caching Query processing Deployment solutions for disaster recovery Overview Identity authenticationAccess control Data transmission encryption Data storage encryption Monitoring and alerts Security audit Structure of the OBServer installation directoryConfiguration files Logs Appendix: Basic concepts of OceanBase Database OceanBase Database Enterprise Edition V3.2.4 OceanBase Database Enterprise Edition V3.2.3 OceanBase Database Enterprise Edition V3.2.2 OceanBase Database Enterprise Edition V3.2.1 OceanBase Database Enterprise Edition V3.2.0 OceanBase Database Enterprise Edition V3.1.2 OceanBase Database Enterprise Edition V3.1.1 OceanBase Database Enterprise Edition V2.2.77
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. V3.2.4
iconOceanBase Database
SQL - V 3.2.4Enterprise Edition
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

About partitioned tables

Last Updated:2023-10-24 09:23:03  Updated
share
What is on this page
Background
Benefits
Partitioning types
Partitioning strategies
RANGE partitioning
RANGE COLUMNS partitioning
HASH partitioning
KEY partitioning
LIST partitioning
LIST COLUMNS partitioning
Subpartitioning

folded

share

This topic describes the partitioned tables in OceanBase Database.

Background

Partitioning is one of the most important features of OceanBase Database. It solves the capacity problems and performance problems during highly concurrent access to large tables. It splits a large table into smaller independent objects with the same structure. These smaller objects are called partitions. A regular table contains only one partition. This can be considered as a special case of partitioned tables. A partition can be deployed on only one node. Different partitions in a table can be distributed on different nodes.

Table partitioning means to aggregate the same type of data in a large data table into several smaller tables based on specified rules.

Benefits

With partitioned tables, you can:

  • Improve data management.

  • Enhance the data usage efficiency.

Partitioning types

Partitioning strategies

OceanBase Database provides multiple partitioning strategies that specify how data is distributed across partitions.

The basic partitioning strategies supported by OceanBase Database are RANGE, LIST, and HASH.

A single-level partitioning strategy uses only one data distribution method. For example, during single-level partitioning, you can use LIST partitioning or RANGE partitioning, but you cannot use them at the same time.

In composite partitioning, a table is partitioned by using a data distribution method and then subpartitioned by using another data distribution method. For example, assume that you have a table that contains the create_time and user_id columns. You can use RANGE partitioning on the create_time column and use HASH partitioning on the user_id column to create subpartitions.

RANGE partitioning

RANGE partitioning is the most commonly used partitioning method. It is often used when you want to query tables with dates. In RANGE partitioning, the database maps rows to partitions based on ranges of partitioning key values.

You can use only one column of the INT type as the partitioning key for RANGE partitioning.

If you want to use multiple columns or a column of other data types as the partitioning key, you can choose RANGE COLUMNS partitioning.

RANGE COLUMNS partitioning is similar to RANGE partitioning, but the two differ in the following aspects:

  • Columns for RANGE COLUMNS partitioning are not restricted to integer columns. Instead, any types of columns are supported.

  • Expressions are not accepted for RANGE COLUMNS partitioning.

  • Multiple columns or column vectors are accepted for RANGE COLUMNS partitioning.

Syntax

RANGE partitioning maps data to partitions based on ranges of partitioning key values that you set up for each partition when you define the partitioned table. It is the most common partitioning type and is often used with dates. For example, you can partition business log tables by day, week, or month. Basic syntax for RANGE partitioning:

CREATE TABLE table_name (
    column_name1        column_type
    [, column_nameN     column_type]
) PARTITION BY RANGE ( expr(column_name1) )
(
    PARTITION   p0      VALUES LESS THAN ( expr )
    [, PARTITION pN     VALUES LESS THAN (expr ) ]
 [, PARTITION pX    VALUES LESS THAN (maxvalue) ]
);

The following rules apply when you use RANGE partitioning:

  • The expr expression in the PARTITION BY RANGE (expr) clause must return an integer value.

  • Each partition has a VALUES LESS THAN clause, which specifies a non-inclusive upper bound literal for the partitions. Values of the partitioning key equal to or higher than this upper bound are added to the next higher partition.

  • All partitions, except the first one, have an implicit lower bound, which is the upper bound of the previous partition.

  • A MAXVALUE literal can and can only be defined for the last partition. MAXVALUE represents a virtual infinite value that is always greater than other possible values for the partitioning key, including the NULL value.

Example

Create a RANGE-partitioned table.

  1. Create a RANGE-partitioned table named t_log_part_by_range.

    CREATE TABLE t_log_part_by_range (
      log_id bigint NOT NULL,
      log_value varchar(50),
      log_date timestamp NOT NULL
    ) PARTITION BY RANGE(UNIX_TIMESTAMP(log_date)) (
      PARTITION M197001
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/02/01')),
        PARTITION M197002
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/03/01')),
        PARTITION M197003
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/04/01')),
        PARTITION M197004
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/05/01')),
        PARTITION M197005
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/06/01')),
        PARTITION M197006
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/07/01')),
        PARTITION M197007
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/08/01')),
        PARTITION M197008
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/09/01')),
        PARTITION M197009
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/10/01')),
        PARTITION M197010
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/11/01')),
        PARTITION M197011
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/12/01')),
        PARTITION M197012
      VALUES
        LESS THAN(UNIX_TIMESTAMP('2021/01/01'))
    );
    
  2. View the t_log_part_by_range partitioned table.

    obclient> SHOW CREATE TABLE t_log_part_by_range\G
    *************************** 1. row ***************************
           Table: t_log_part_by_range
    Create Table: CREATE TABLE `t_log_part_by_range` (
      `log_id` bigint(20) NOT NULL,
      `log_value` varchar(50) DEFAULT NULL,
      `log_date` timestamp NOT NULL
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by range(UNIX_TIMESTAMP(log_date))
    (partition M197001 values less than (1580486400),
    partition M197002 values less than (1582992000),
    partition M197003 values less than (1585670400),
    partition M197004 values less than (1588262400),
    partition M197005 values less than (1590940800),
    partition M197006 values less than (1593532800),
    partition M197007 values less than (1596211200),
    partition M197008 values less than (1598889600),
    partition M197009 values less than (1601481600),
    partition M197010 values less than (1604160000),
    partition M197011 values less than (1606752000),
    partition M197012 values less than (1609430400))
    1 row in set 
    

You can add and drop RANGE partitions. If the MAXVALUE is specified in the last RANGE partition, you cannot add another partition.

RANGE partitioning requires the partitioning key expression to return an integer value. To partition a table by RANGE based on a time column, the column must be a TIMESTAMP column and you must use the UNIX_TIMESTAMP function to convert timestamps to numeric values. This can also be implemented by RANGE COLUMNS partitioning, which does not require the results of the partitioning key expression to be integer values.

RANGE COLUMNS partitioning

RANGE COLUMNS partitioning is similar to RANGE partitioning, but the two differ in the following aspects:

  • Columns for RANGE COLUMNS partitioning are not restricted to integer columns. Instead, any types of columns are supported.

  • Expressions are not accepted for RANGE COLUMNS partitioning.

  • Multiple columns or column vectors are accepted for RANGE COLUMNS partitioning.

Syntax

Basic syntax for RANGE COLUMNS partitioning:

CREATE TABLE table_name (
    column_name1        column_type
    [, column_nameN     column_type]
) PARTITION BY RANGE ( column_name1 [, column_name2] )
(
    PARTITION   p0      VALUES LESS THAN ( expr )
    [, PARTITION pN     VALUES LESS THAN (expr ) ]
[, PARTITION pX VALUES LESS THAN (maxvalue) ]
);

Example

Create a RANGE COLUMNS-partitioned table.

  1. Create a RANGE COLUMNS-partitioned table named t_log_part_by_range_columns.

    CREATE TABLE t_log_part_by_range_columns (
      log_id bigint NOT NULL,
      log_value varchar(50),
      log_date date NOT NULL
    ) PARTITION BY RANGE COLUMNS(log_date) (
      PARTITION M197001
      VALUES
        LESS THAN('1970/02/01'),
        PARTITION M197002
      VALUES
        LESS THAN('1970/03/01'),
        PARTITION M197003
      VALUES
        LESS THAN('1970/04/01'),
        PARTITION M197004
      VALUES
        LESS THAN('1970/05/01'),
        PARTITION M197005
      VALUES
        LESS THAN('1970/06/01'),
        PARTITION M197006
      VALUES
        LESS THAN('1970/07/01'),
        PARTITION M197007
      VALUES
        LESS THAN('1970/08/01'),
        PARTITION M197008
      VALUES
        LESS THAN('1970/09/01'),
        PARTITION M197009
      VALUES
        LESS THAN('1970/10/01'),
        PARTITION M197010
      VALUES
        LESS THAN('1970/11/01'),
        PARTITION M197011
      VALUES
        LESS THAN('1970/12/01'),
        PARTITION M197012
      VALUES
        LESS THAN('2021/01/01'),
        PARTITION MMAX
      VALUES
        LESS THAN MAXVALUE
    );
    
  2. View the t_log_part_by_range_columns partitioned table.

    obclient> SHOW create table t_log_part_by_range_columns\G
    *************************** 1. row ***************************
           Table: t_log_part_by_range_columns
    Create Table: CREATE TABLE `t_log_part_by_range_columns` (
      `log_id` bigint(20) NOT NULL,
      `log_value` varchar(50) DEFAULT NULL,
      `log_date` date NOT NULL
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by range columns(log_date)
    (partition M197001 values less than ('1970-02-01'),
    partition M197002 values less than ('1970-03-01'),
    partition M197003 values less than ('1970-04-01'),
    partition M197004 values less than ('1970-05-01'),
    partition M197005 values less than ('1970-06-01'),
    partition M197006 values less than ('1970-07-01'),
    partition M197007 values less than ('1970-08-01'),
    partition M197008 values less than ('1970-09-01'),
    partition M197009 values less than ('1970-10-01'),
    partition M197010 values less than ('1970-11-01'),
    partition M197011 values less than ('1970-12-01'),
    partition M197012 values less than ('2021-01-01'),
    partition MMAX values less than (MAXVALUE))
    1 row in set
    

HASH partitioning

In HASH partitioning, the database maps rows to partitions based on a hashing algorithm that the database applies to the user-specified partitioning key.

The destination of a row is determined based on the number of HASH partitions calculated by using the internal hash function applied to the row. The hashing algorithm is designed to evenly distribute rows across partitions when the number of partitions is a power of two.

Therefore, the partitions are almost the same size.

If you want to evenly distribute data across nodes, we recommend that you use the HASH partitioning method. HASH partitioning is also a simple alternative to RANGE partitioning, especially when you want to partition a table that contains non-historical data or does not have an obvious partitioning key.

You can also use HASH partitioning in online transaction processing (OLTP) systems with high update contention. HASH partitioning allows you to divide modifications to a single table into modifications to different partitions.

The values returned by the expression of a HASH partitioning key must be of the INT type.

Syntax

HASH partitioning applies to scenarios where RANGE partitioning or LIST partitioning cannot be used. HASH partitioning enables easy partitioning of data by distributing records over partitions based on a hash function on the partitioning key. HASH partitioning is a better choice in the following cases:

  • You cannot identify an obvious partitioning key for the data.

  • The sizes of RANGE partitions differ substantially or are difficult to balance manually.

  • RANGE partitioning can cause the data to be undesirably clustered.

  • Performance features such as parallel DML, partition pruning, and partition-wise joins are important.

    CREATE TABLE table_name (column_name column_type[,column_name column_type])
      PARTITION BY { HASH(expr) | KEY([column_name_list]) } 
        PARTITIONS partition_count;
    

Example

Create a HASH-partitioned table.

  1. Create a HASH-partitioned table named ware.

    CREATE TABLE ware (
      w_id int,
      w_ytd number(12, 2),
      w_tax number(4, 4),
      w_name varchar(10),
      w_street_1 varchar(20),
      w_street_2 varchar(20),
      w_city varchar(20),
      w_state char(2),
      w_zip char(9),
      PRIMARY KEY (w_id)
    ) PARTITION BY HASH (w_id) PARTITIONS 60;
    

    Note

    HASH partitioning does not support partition deletion.

  2. View the ware partitioned table.

    obclient> SHOW CREATE TABLE ware\G
    *************************** 1. row ***************************
           Table: ware
    Create Table: CREATE TABLE `ware` (
    ` w_id` int DEFAULT NULL,
     `w_name` varchar(10) DEFAULT NULL,
      `w_street_1` varchar(20) DEFAULT NULL,
      `w_street_2` varchar(20) DEFAULT NULL,
      `w_city` varchar(20) DEFAULT NULL,
      `w_state` char(2) DEFAULT NULL,
      `w_zip` char(9) DEFAULT NULL,
      PRIMARY KEY (`w_id`)
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by hash(w_id)
    (partition p0,
    partition p1,
    partition p2,
    partition p3,
    partition p4,
    partition p5,
    partition p6,
    partition p7,
    partition p8,
    partition p9,
    partition p10,
    partition p11,
    partition p12,
    partition p13,
    partition p14,
    partition p15,
    partition p16,
    partition p17,
    partition p18,
    partition p19,
    partition p20,
    partition p21,
    partition p22,
    partition p23,
    partition p24,
    partition p25,
    partition p26,
    partition p27,
    partition p28,
    partition p29,
    partition p30,
    partition p31,
    partition p32,
    partition p33,
    partition p34,
    partition p35,
    partition p36,
    partition p37,
    partition p38,
    partition p39,
    partition p40,
    partition p41,
    partition p42,
    partition p43,
    partition p44,
    partition p45,
    partition p46,
    partition p47,
    partition p48,
    partition p49,
    partition p50,
    partition p51,
    partition p52,
    partition p53,
    partition p54,
    partition p55,
    partition p56,
    partition p57,
    partition p58,
    partition p59)
    1 row in set
    

KEY partitioning

KEY partitioning is similar to HASH partitioning. The two partitioning strategies differ in the following aspects:

  • The partitioning key for HASH partitioning can be a custom expression, whereas the partitioning key for KEY partitioning must be a column or left empty.

  • The partitioning key for KEY partitioning is not limited to the INT type.

During KEY partitioning, you can specify one or multiple columns as the partitioning key or specify no partitioning key. If the table where KEY partitioning is performed has the primary key, the one or more columns that are specified as the partitioning key must be part of or the entire primary key. If no partitioning key is specified during KEY partitioning, the primary key of the table functions as the partitioning key. If the table has no primary key but a unique key, the unique key is used as the partitioning key.

Syntax

KEY partitioning is similar to HASH partitioning and applies to all data types except for TEXT and BLOB. KEY partitioning does not support custom expressions but the hash function provided by the MySQL server.

CREATE TABLE table_name (column_name column_type[,column_name column_type])
  PARTITION BY { HASH(expr) | KEY([column_name_list]) } 
    PARTITIONS partition_count;

Example

Create a KEY-partitioned table.

  1. Create a KEY-partitioned table named t_key_ny.

    CREATE TABLE t_key_ny (
      id INT ,
      var CHAR(32)
    )
    PARTITION BY KEY(var)
    PARTITIONS 10;
    
  2. View the t_key_ny table.

    obclient> SHOW create table t_key_ny\G
    *************************** 1. row ***************************
           Table: t_key_ny
    Create Table: CREATE TABLE `t_key_ny` (
      `id` int(11) DEFAULT NULL,
      `var` char(32) DEFAULT NULL
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by key(var)
    (partition p0,
    partition p1,
    partition p2,
    partition p3,
    partition p4,
    partition p5,
    partition p6,
    partition p7,
    partition p8,
    partition p9)
    1 row in set
    

LIST partitioning

In LIST partitioning, the database uses a list of discrete values as the partitioning key for each partition. The partitioning key consists of one or more columns.

You can perform LIST partitioning to control how a single row is mapped to a specified partition. LIST partitioning allows you to group and organize related sets of data when the key used to identify them is not conveniently ordered.

LIST partitioning supports only a single partitioning key that may be a column or an expression. The partitioning key must be of the INT type.

Syntax

Unlike RANGE partitioning and HASH partitioning, LIST partitioning enables you to explicitly control how rows map to partitions by specifying a list of discrete values for the partitioning key in the description for each partition. The advantage of LIST partitioning is that you can partition unordered and unrelated data. Basic syntax for LIST partitioning:

CREATE TABLE table_name (
    column_name1        column_type
    [, column_nameN     column_type]
) PARTITION BY LIST ( expr(column_name1) )
(
    PARTITION   p0      VALUES IN ( v01 [, v0N] )
    [, PARTITION pN     VALUES IN ( vN1 [, vNN] ) ]
 [, PARTITION pX    VALUES IN (default) ]
);

The following rules apply when you use LIST partitioning:

  • The partitioning expression must return an integer value.

  • The partitioning expression can reference only one column, instead of a list of multiple columns (column vectors).

Example

Create a LIST-partitioned table.

  1. Create a LIST-partitioned table named t_part_by_list.

    CREATE TABLE t_part_by_list (
      c1 BIGINT PRIMARY KEY,
      c2 VARCHAR(50)
    ) PARTITION BY list(c1) (
      PARTITION p0
      VALUES
        IN (1, 2, 3),
        PARTITION p1
      VALUES
        IN (5, 6),
        PARTITION p2
      VALUES
        IN (DEFAULT)
    );
    

    Note

    You can add more LIST partitions, specifying a new non-duplicate table. You can also drop a partition.

  2. View the t_part_by_list partitioned table.

    obclient> SHOW create table t_part_by_list\G
    *************************** 1. row ***************************
           Table: t_part_by_list
    Create Table: CREATE TABLE `t_part_by_list` (
      `c1` bigint(20) NOT NULL,
      `c2` varchar(50) DEFAULT NULL,
      PRIMARY KEY (`c1`)
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by list(c1)
    (partition p0 values in (1,2,3),
    partition p1 values in (5,6),
    partition p2 values in (DEFAULT))
    1 row in set
    

LIST COLUMNS partitioning

If you want to use multiple columns or a column of other data types as the partitioning key, you can choose LIST COLUMNS partitioning.

LIST COLUMNS partitioning is a variant of LIST partitioning. During LIST COLUMNS partitioning, you can specify multiple partitioning keys. The partitioning keys can be of the following data types: INT, DATE, and DATETIME.

Syntax

LIST COLUMNS partitioning is similar to LIST partitioning, but they are different in the following aspects:

  • The use of expressions is not accepted for LIST COLUMNS partitioning.

  • LIST COLUMNS partitioning enables the use of multiple columns as partitioning keys (column vectors).

Basic syntax for LIST COLUMNS partitioning:

CREATE TABLE table_name (
    column_name1        column_type
    [, column_nameN     column_type]
) PARTITION BY LIST COLUMNS ( column_name1 [, column_nameN ] )
(
    PARTITION   p0      VALUES IN ( v01 [, v0N] )
    [, PARTITION pN     VALUES IN ( vN1 [, vNN] ) ]
 [, PARTITION pX    VALUES IN (default) ]
);

Example

Create a LIST COLUMNS-partitioned table.

  1. Create a LIST COLUMNS-partitioned table named t2.

    CREATE TABLE t2 (
      id varchar(64),
      type varchar(16),
      info varchar(512),
      gmt_create datetime(6),
      gmt_modified datetime(6),
      partition_id varchar(2) GENERATED ALWAYS AS (substr(`id`, 19, 20)) VIRTUAL,
      PRIMARY KEY (id)
    ) partition by list columns(partition_id) (
      partition p0
      values
        in ('00', '01'),
        partition p1
      values
        in ('02', '03'),
        partition p2
      values
        in (default)
    );
    
  2. View the t2 partitioned table.

    obclient> SHOW CREATE TABLE t2\G
    *************************** 1. row ***************************
           Table: t2
    Create Table: CREATE TABLE `t2` (
      `id` varchar(64) NOT NULL,
      `type` varchar(16) DEFAULT NULL,
      `info` varchar(512) DEFAULT NULL,
      `gmt_create` datetime(6) DEFAULT NULL,
      `gmt_modified` datetime(6) DEFAULT NULL,
      `partition_id` varchar(2) GENERATED ALWAYS AS (substr(`id`,19,20)) VIRTUAL,
      PRIMARY KEY (`id`)
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by list columns(partition_id)
    (partition p0 values in ('00','01'),
    partition p1 values in ('02','03'),
    partition p2 values in (DEFAULT))
    1 row in set
    

Subpartitioning

You can use the RANGE, LIST, and HASH partitioning methods to divide a partition into subpartitions.

In composite partitioning, a table is partitioned by using a data distribution method and then subpartitioned by using another data distribution method. Composite partitioning is a combination of two basic partitioning methods. All subpartitions of a specified partition represent a logical subset of data in the partition.

Composite partitioning provides the following benefits:

  • You can perform partition pruning on one or two dimensions based on the SQL statement to improve query performance.

  • You can perform partial partition-wise and full partition-wise joins for queries on either dimension.

  • You can perform parallel backup and recovery on a table.

  • Compared with single-level partitioning, composite partitioning generates more partitions. This can be beneficial for the efficient parallel execution of queries.

  • You can implement a rolling window to support historical data and still partition on another dimension if many statements can benefit from partition pruning or partition-wise joins.

  • You can store data based on the partitioning key. For example, you can store data for a specific product type in a read-only and compressed format, and keep data of other product types uncompressed.

The following figure shows a graphical view of the RANGE-HASH and RANGE-LIST composite partitioning methods.

p355750

Examples

  1. Create a table named t_ordr_part_by_hash_range.

    CREATE TABLE t_ordr_part_by_hash_range (
      o_w_id int,
      o_d_id int,
      o_id int,
      o_c_id int,
      o_carrier_id int,
      o_ol_cnt int,
      o_all_local int,
      o_entry_d TIMESTAMP NOT NULL,
      index idx_ordr(o_w_id, o_d_id, o_c_id, o_id) LOCAL,
      primary key (o_w_id, o_d_id, o_id, o_entry_d)
    ) PARTITION BY hash(o_w_id) SUBPARTITION BY RANGE(UNIX_TIMESTAMP(o_entry_d)) SUBPARTITION template (
      SUBPARTITION M197001
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/02/01')),
        SUBPARTITION M197002
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/03/01')),
        SUBPARTITION M197003
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/04/01')),
        SUBPARTITION M197004
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/05/01')),
        SUBPARTITION M197005
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/06/01')),
        SUBPARTITION M197006
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/07/01')),
        SUBPARTITION M197007
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/08/01')),
        SUBPARTITION M197008
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/09/01')),
        SUBPARTITION M197009
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/10/01')),
        SUBPARTITION M197010
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/11/01')),
        SUBPARTITION M197011
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/12/01')),
        SUBPARTITION M197012
      VALUES
        LESS THAN(UNIX_TIMESTAMP('2021/01/01')),
        SUBPARTITION MMAX
      VALUES
        LESS THAN MAXVALUE
    ) partitions 16;
    

    View the t_ordr_part_by_hash_range table.

    obclient> SHOW CREATE TABLE t_ordr_part_by_hash_range\G
    *************************** 1. row ***************************
           Table: t_ordr_part_by_hash_range
    Create Table: CREATE TABLE `t_ordr_part_by_hash_range` (
      `o_w_id` int(11) NOT NULL,
      `o_d_id` int(11) NOT NULL,
      `o_id` int(11) NOT NULL,
      `o_c_id` int(11) DEFAULT NULL,
      `o_carrier_id` int(11) DEFAULT NULL,
      `o_ol_cnt` int(11) DEFAULT NULL,
      `o_all_local` int(11) DEFAULT NULL,
      `o_entry_d` timestamp NOT NULL,
      PRIMARY KEY (`o_w_id`, `o_d_id`, `o_id`, `o_entry_d`),
      KEY `idx_ordr` (`o_w_id`, `o_d_id`, `o_c_id`, `o_id`) BLOCK_SIZE 16384 LOCAL
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by hash(o_w_id) subpartition by range(UNIX_TIMESTAMP(o_entry_d)) subpartition template (
    subpartition M197001 values less than (2649600),
    subpartition M197002 values less than (5068800),
    subpartition M197003 values less than (7747200),
    subpartition M197004 values less than (10339200),
    subpartition M197005 values less than (13017600),
    subpartition M197006 values less than (15609600),
    subpartition M197007 values less than (18288000),
    subpartition M197008 values less than (20966400),
    subpartition M197009 values less than (23558400),
    subpartition M197010 values less than (26236800),
    subpartition M197011 values less than (28828800),
    subpartition M197012 values less than (1609430400),
    subpartition MMAX values less than (MAXVALUE))
    (partition p0,
    partition p1,
    partition p2,
    partition p3,
    partition p4,
    partition p5,
    partition p6,
    partition p7,
    partition p8,
    partition p9,
    partition p10,
    partition p11,
    partition p12,
    partition p13,
    partition p14,
    partition p15)
    1 row in set
    
  2. Create a table named t_log_part_by_range_hash.

    CREATE TABLE t_log_part_by_range_hash (
      log_id int NOT NULL,
      log_value varchar(50),
      log_date TIMESTAMP NOT NULL,
      PRIMARY key(log_id, log_date)
    ) PARTITION BY RANGE(UNIX_TIMESTAMP(log_date)) SUBPARTITION BY HASH(log_id) SUBPARTITIONS 16 (
      PARTITION M197001
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/02/01')),
        PARTITION M197002
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/03/01')),
        PARTITION M197003
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/04/01')),
        PARTITION M197004
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/05/01')),
        PARTITION M197005
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/06/01')),
        PARTITION M197006
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/07/01')),
        PARTITION M197007
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/08/01')),
        PARTITION M197008
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/09/01')),
        PARTITION M197009
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/10/01')),
        PARTITION M197010
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/11/01')),
        PARTITION M197011
      VALUES
        LESS THAN(UNIX_TIMESTAMP('1970/12/01')),
        PARTITION M197012
      VALUES
        LESS THAN(UNIX_TIMESTAMP('2021/01/01')),
        PARTITION MMAX
      VALUES
        LESS THAN MAXVALUE
    );
    

    View the t_log_part_by_range_hash table.

    obclient> SHOW CREATE TABLE t_log_part_by_range_hash\G
    *************************** 1. row ***************************
           Table: t_log_part_by_range_hash
    Create Table: CREATE TABLE `t_log_part_by_range_hash` (
      `log_id` int(11) NOT NULL,
      `log_value` varchar(50) DEFAULT NULL,
      `log_date` timestamp NOT NULL,
      PRIMARY KEY (`log_id`, `log_date`)
    ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
     partition by range(UNIX_TIMESTAMP(log_date)) subpartition by hash(log_id) subpartition template (
    subpartition p0,
    subpartition p1,
    subpartition p2,
    subpartition p3,
    subpartition p4,
    subpartition p5,
    subpartition p6,
    subpartition p7,
    subpartition p8,
    subpartition p9,
    subpartition p10,
    subpartition p11,
    subpartition p12,
    subpartition p13,
    subpartition p14,
    subpartition p15)
    (partition M197001 values less than (2649600),
    partition M197002 values less than (5068800),
    partition M197003 values less than (7747200),
    partition M197004 values less than (10339200),
    partition M197005 values less than (13017600),
    partition M197006 values less than (15609600),
    partition M197007 values less than (18288000),
    partition M197008 values less than (20966400),
    partition M197009 values less than (23558400),
    partition M197010 values less than (26236800),
    partition M197011 values less than (28828800),
    partition M197012 values less than (1609430400),
    partition MMAX values less than (MAXVALUE))
    1 row in set
    

Previous topic

About table privileges
Last

Next topic

Create a partitioned table
Next
What is on this page
Background
Benefits
Partitioning types
Partitioning strategies
RANGE partitioning
RANGE COLUMNS partitioning
HASH partitioning
KEY partitioning
LIST partitioning
LIST COLUMNS partitioning
Subpartitioning