Help Center> Distributed Database Middleware> Best Practices> Determining the Number of Shards in a Schema
Updated on 2022-08-01 GMT+08:00

Determining the Number of Shards in a Schema

  • Unsharded, a schema corresponds only to one MySQL instance, and only one shard is created for that instance.
  • Sharded, a single schema corresponds to multiple MySQL instances. You can specify 1 to 64 shards for each MySQL instance. If more than 64 shards are required, contact DDM technical support.

Rebalancing means that database shards are rebalanced between original and new instances.

Figure 1 Rebalancing shards

Configuring shards: You can increase shards in a schema based on service requirements. A maximum of 64 shards can be distributed to a single data node. If more than 64 shards are required, contact DDM technical support. DDM distributes shards to all associated data nodes as much as possible. Data will be redistributed as long as the total number of shards changes.

Figure 2 Configuring shards