ApsaraDB for SelectDB uses the Nereids optimizer and the Pipeline execution engine to automatically optimize queries. To meet requirements for high-performance queries, you can manually optimize queries. For example, you can use index-based acceleration, high-concurrency point queries, materialized views, and join optimization.
Automatic query optimization planning
In SelectDB, the Nereids optimizer and the Pipeline execution engine are core query processing technologies that can be used for deep optimization in the query optimization and execution phases. The technologies significantly improve complex query performance and resource usage. The following figure shows how the technologies optimize an SQL statement in SelectDB.
The following table describes the main features of each technology. For more information, see relevant documentation.
Technology | Feature description |
| |
|
Manual query optimization
If the Nereids optimizer and the Pipeline execution engine of SelectDB do not meet your query requirements, you can use statistics to analyze the query data and select an appripriate policy to optimize queries.
Optimization policy | Scenario | Limit |
You want to optimize high-concurrency point queries. Note A point query is to retrieve a small amount of data from a database that meets specific conditions. In most cases, primary keys or high cardinality columns are used to perform the retrieving. |
| |
You want to optimize complex queries that are repeative and time-consuming. |
For more information, see Limits. | |
You want to quickly query or position data in any scenario. | The limits vary based on the index type. For more information, see Index-based acceleration. | |
You want to optimize join queries. | The join condition must contain the distributed column of the left table, and the left table only uses data from a single partition during the execution. | |
You want to optimize join queries. | The join condition must contain the distributed column of the left table, and the left and right tables belong to the same Colocate Group. | |
Scenarios in which the process for a large table to join a small table needs to be optimized. | When you use a Runtime filter, the JOIN statement must meet the following requirements:
| |
|
| |
|
|