Physical distribution of data
PolarDB-X horizontally partitions data tables into multiple data nodes. How data is partitioned is determined by partitioning functions. PolarDB-X supports common partitioning functions such as hash and range.
Scale-out and migration
The amount of data increases when your business grows. In this case, more data nodes are required to handle increasing amounts of data. When a new data node is added to a cluster, PolarDB-X automatically triggers a scale-out task to rebalance data.
To improve the performance of JOIN queries, we recommend that you design the partition key for each PolarDB-X table based on your business scenario. This way, associated tables can be partitioned by using the same method.
SELECT * FROM user, orders WHERE user.id = orders.user_id WHERE user.id = ...
Table groups are important in migrating, splitting, and merging partitions. In the preceding example, if a partition of the user table is migrated but the corresponding partition of the orders table is not migrated, the preceding query cannot be pushed down to the data nodes. This can significantly reduce performance. This issue can be resolved by using table groups. In the preceding example, the user table and the orders table belong to the same table group. If a migration, splitting, or merging operation is performed on a partition of one table, PolarDB-X synchronizes the operation to the corresponding partition of the other table.