This topic provides the results of online transaction processing (OLTP) performance tests on PolarDB for MySQL 8.0.

The optimizer of PolarDB for MySQL 8.0 supports the following two modes:

  • Cost-Based Optimization (CBO): selects the most efficient execution plans of queries by using a cost-based model based on statistics or real-time sample data.
  • Rule-Based Optimization (RBO): determines the execution plans of queries based on the preset rules.

The PolarDB for MySQL 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 required statistics include the table size, number of records, density vector, histogram statistics for a single column in MySQL, 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. The execution paths of queries can be determined or the search scope of CBO can be controlled to prevent CBO from generating invalid execution plans.

Note For more information about test procedures, see OLTP performance tests.

Test results of clusters that have the primary node and one read-only node

  • Figure 1. Read-only performance of different specifications
    1
  • Figure 2. Write-only performance of different specifications
    2
  • Figure 3. Read-write performance of different specifications
    3

Test results of clusters that have the primary node and multiple read-only nodes

Figure 4. Read-only performance
4
Note
  • The preceding figure shows the test result of read-only queries per second (QPS) when the clusters that are connected by using cluster endpoints are tested.
  • The preceding test uses clusters whose node specifications are 4 cores and 16 GB.