PolarDB for MySQL 8.0.2 has been officially launched.

The following new features and optimizations are provided in PolarDB for MySQL 8.0.2:
  • The parallel query and hash join capabilities are enhanced.
  • Partitioned table capabilities are enhanced to support more partitioned table types, partition locks, and interval partitioning.
  • Subquery decorrelation will be available soon. You can use window functions and the GROUP BY clause to decorrelate subqueries.
  • OSS external tables will be available soon.

Parallel query 2.0

In PolarDB for MySQL 8.0.1, the parallel query is a relatively simple two-phase execution model (scatter-gather model) and subject to the following limits:
  • The simple execution framework may lead to performance bottleneck for some heavily used computing operators (grouping and aggregation).
  • Operator parallelism is not fully supported. For example, window functions and nested derived tables do not support parallelism.
  • The parallel execution of operators is simple. For example, all joins must be pushed down. Group aggregation is executed in two phases.
These limits make PolarDB for MySQL 8.0.1 not ideal for complex analytic queries. Parallel query 2.0 in PolarDB for MySQL 8.0.2 solves the preceding limits and provides comprehensive support for complex analytic queries.
  • A multi-phase execution framework can parse SQL statements into multiple computing operators. Each operator can be distributed to multiple workers for parallel execution. The operators in a worker are efficiently executed in a pipelined manner.
  • Parallelism of all operators is supported.
  • Multiple operator parallelism methods are supported, such as shuffle join, one-phase group aggregation, and cost-based parallelism selection. For more information, see Parallel query.

Enhanced hash joins

The following hash joins are supported in parallel queries: simple parallel hash joins, parallel hash joins, and shuffle hash joins. For more information, see Hash joins in parallel queries.

Enhanced capabilities for partitioned tables

More partitioned table types

Composite partitioning supports more partitioned table types: range-range, range-list, list-range, list-list, hash-hash, hash-key, hash-range, hash-list, key-key, key-range, key-list, list default hash, and unique check ignore. For more information, see Overview.

Online partition maintenance

The parallel capabilities of DML statements and the DDL statements for adding and deleting partitions are enhanced to roll-In and roll-out partitioned tables. For more information, see Online partition maintenance.

Interval partitioning

Interval range partitioning is an extension of range partitioning. It allows a database to automatically create a partition when data to be inserted exceeds the range of an existing partition. For more information, see Overview.

Subquery decorrelation

Correlated subqueries are widely used in analytic scenarios. For example, more than one third of the 22 queries in TPC-H contain correlated subqueries. If the subquery is not decorrelated, the subquery will be executed once each time an outer query is performed on a row of data. If an outer query generates a large amount of data and a subquery is not associated with an index, multiple executions of a subquery are time-consuming. Subquery decorrelation transforms the correlated subquery into an equivalent JOIN statement. This can avoid multiple executions of the subquery and allow the optimizer to further optimize the JOIN statement.

OSS external tables

The OSS engine allows PolarDB to directly query CSV data stored in OSS and therefore effectively reduce storage costs. You can use OSS foreign tables to store cold data in the CSV format on the OSS engine and then query and analyze cold data.