OceanBase Database allows you to use OceanBase Cloud Platform (OCP) for performance tuning. This topic describes the OCP features that are related to performance tuning.
Monitoring and alerts
OCP supports the 24/7 collection of monitoring metrics such as the performance, capacity, and running status of clusters, tenants, and nodes. OCP also displays the metrics in charts to help you understand the performance of OceanBase clusters, identify cluster exceptions, and receive alerts in real time, thus ensuring the stable and efficient operation of your OceanBase database.
For more information, see Manage alerts.
SQL diagnostics
Currently, for many companies, relational databases are still the main data storage engines, and the business systems access the databases by using SQL statements. As an important component of an IT system, SQL statements play an important role in performance metrics such as system availability, user response time, system throughput, and IT facility cost. Issues caused by SQL statements occur time after time. Therefore, OCP provides a multi-dimensional SQL diagnostics feature, covering TopSQL, SlowSQL, ParallelSQL, suspicious SQL, SQL Plan, Outline, SQLTuningAdvisor, and SQL request analysis, to help you cope with different application scenarios. In addition, OCP provides emergency tuning features such as SQL tuning suggestions, index binding, plan binding, SQL throttling, and keyword throttling, providing the whole-process SQL problem identification, analysis, and processing capabilities.
For more information, see SQL diagnostics.
Performance report
OceanBase Analyze Report (OBAR) provides database performance analysis to help you comprehensively diagnose OceanBase Database performance issues. OBAR aims to keep users informed of cluster and tenant loads and performance to help users execute general inspections and learn about the inspection results in the form of reports. These reports are easy to operate on. You can aggregate the system status information in multiple dimensions and learn about the cluster status with a few clicks.
ASH report
Applicability
Currently, OceanBase Database Community Edition does not support OceanBase Active Session History (ASH) reports.
ASH reports analyze instantaneous exceptions and provide more fine-grained diagnostic information than performance reports. ASH reports are generated in two stages: data collection and report generation. In the data collection stage, an ocp_monagent process is deployed on each server in an OceanBase cluster managed by OCP. The ocp_monagent process collects monitoring data based on specific strategies and persists the data to the MonitorDB of OCP. In the report generation stage, OCP generates a report when you enter the relevant information in the ASH module of OCP. In terms of the implementation logic, the task module of OCP executes multiple subtasks concurrently. Different subtasks exchange information through CONTEXT. The final report content is saved in the OSS bucket of OCP for you to access as needed. OceanBase Database records all wait events of the SQL statements that have been executed in the session of each user in the v$session_event view, including the wait event ID, the number of waits, and the cumulative wait time. The ocp_monagent process collects data from v$session_event at a fixed frequency and stores incremental data.
Transaction diagnostics
In the transaction execution process of Oceanbase Database, a transaction that occupies resources for a long time or occupies excessive system resources can make the system unstable and affect the database service efficiency. This type of transaction is called a large transaction. OCP transaction diagnostics provides monitoring, analysis, and emergency handling capabilities for these large transactions. The transaction diagnostics feature provides details of large transactions, including execution details and details of executed SQL statements. The feature provides a transaction model to help you identify the reasons for the time and resources consumed in the transaction. Then, you can perform service tuning based on such information. Transactions can be divided into three types based on their status and duration: long transactions, suspended transactions, and common transactions. Long transactions and suspended transactions are abnormal transactions that must be handled. OCP provides emergency means for handling abnormal transactions. You can close abnormal transactions or take emergency measures to help the system quickly return to a stable state.
Deadlock detection
OceanBase Database supports automatic distributed detection of deadlocks. OceanBase Database automatically detects and clears deadlocks when automatic distributed detection of deadlocks is enabled. You must determine whether to commit or roll back the transaction based on the SQL exception information. You can check the number of deadlock nodes, interrupted deadlock nodes, and SQL statements executed by each node.