Help Center> GaussDB> User Guide> Performance Tuning> Optimization Cases> Case: Reconstructing Partitioned Tables
Updated on 2024-01-12 GMT+08:00

Case: Reconstructing Partitioned Tables

Symptom

In the following simple SQL statements, the performance bottlenecks exist in the scan operation on the dwcjk table.

Optimization Analysis

Obviously, there are date features in the cjrq field of table data in the service layer, and this meet the features of a partitioned table. Replan the table definition of the dwcjk table: Use the cjrq field as a partition key, and day as an interval unit to define the partitioned table dwcjk_part. The modified result is as follows, and the performance is nearly doubled.