This topic provides the test results of online transaction processing (OLTP) performance of ApsaraDB PolarDB MySQL-compatible edition 8.0 Cluster Edition.
The optimizer of ApsaraDB PolarDB MySQL-compatible edition 8.0 supports the two modes: Cost-Based Optimization (CBO) and Rule-Based Optimization (RBO).
- CBO: selects the execution plans that have the minimum costs by using a cost model based on statistics or real-time sample data.
- RBO: determines the execution plans of queries based on the preset rules.
The ApsaraDB PolarDB MySQL-compatible edition 8.0 optimizer uses CBO as the primary mode, and uses RBO as a complementary mode in specific scenarios. You can run the ANALYZE command to collect the required statistics, or allow the optimizer to automatically collect the statistics. The statistics include the table size, number of records, density vector, hybrid histogram for a single column, number of distinct values (NDV), and null ratio. The cost model parameters of CBO can be configured in system tables to adapt to software and hardware environments. Meanwhile, the execution paths of queries can be locked or the search scope of CBO can be controlled to prevent the system from generating invalid execution plans.
Primary node and a single read-only node
Note In the preceding test, queries on all the ranges are disabled. This indicates that the range_selects parameter is set to 0. Therefore, the performance is high.
Note In the preceding query:
- Write QPS indicates the number of SQL requests (including BEGIN, COMMIT, INSERT, UPDATE, and DELETE) that are executed by the database per second.
- Write TPS indicates the number of transactions that are executed by the database per second. A transaction is executed only after it is committed.
For more information about how to test write QPS and write TPS, see Use SysBench to test the write performance.
Primary node and multiple read-only nodes
- The preceding figure shows the test results of read-only queries per second (QPS) when the clusters that are connected by using cluster endpoints are tested.
- In the preceding test, the range_selects parameter is not specified. This indicates that queries on all the ranges are enabled by default.
- In the preceding test, the cluster specification is 4 cores and 16 GB.