Choose a Sharding Advisor Recommended Configuration

There are some aspects of database sharding to take into consideration when deciding which configuration to choose for your distributed database.

Increasing the number of shards will result in higher availability and scalability of the distributed database.

Minimizing duplicated data can conflict with your desire to minimize multi-shard queries that require joins across multiple shards. Because joins in a distributed database are usually performed on related data, storing related data in the same shard can dramatically speed up processing of such joins.

The overall cost, in terms of query workload, of the recommended sharding configurations is based on the number of each query type (single shard, multi-shard, and multi-shard with cross-shard joins) in the workload, where multi-shard queries with cross-shard joins have the highest cost, and single shard queries have the lowest cost. The cost information is in the COST column of the Sharding Advisor SHARDINGADVISOR_CONFIGDETAILS output table.