All Products
Search
Document Center

AnalyticDB for PostgreSQL:Configure parallel query

Last Updated:Apr 19, 2024

AnalyticDB for PostgreSQL provides parallel query for individual tables. In low-concurrency scenarios, if parallel query is enabled, aggregate queries on individual tables that have large amounts of data can reduce the query time by about 50%.

Introduction

If your instance uses compute nodes that have 4 cores or higher specifications, parallel query is enabled by default for individual table queries to improve multi-core concurrency and reduce query time. The system automatically selects the degree of parallelism based on the number of concurrent queries, compute node specifications, and SQL statements. When the system detects a high workload, it disables parallel query.

Note
  • Make sure that the minor version of your instance is 6.3.4.0 or later. For more information about how to update the minor version, see Update the minor engine version.

  • Parallel query can be used for instances whose compute nodes have 4 cores or higher specifications.

Example

In this example, an AnalyticDB for PostgreSQL instance that has the following configurations is used:

  • Compute node specifications: 4C32G

  • Number of compute nodes: 4

Query time of individual tables before and after parallel acceleration for 10 GB data:

  • Before parallel acceleration并行加速前

  • After parallel acceleration并行加速后

Before parallel acceleration

After parallel acceleration

17456.066 ms

9407.291 ms