Help Center> GaussDB> Distributed_2.x> Performance Tuning> Optimization Cases> Case: Modifying a Partitioned Table
Updated on 2023-10-23 GMT+08:00

Case: Modifying a Partitioned Table

Symptom

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

Optimization Analysis

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