The law of large numbers and the MySQL static sharding policy have two advantages: static, dynamic, and static sharding: simple, low development costs, and low maintenance costs common static sharding methods include Hash Functions and modulo operations, but this exposes a drawback (PS: there are still many disadvantages ): this disadvantage is as follows: when static sharding is adopted, we cannot define which shard the data is put into. If there is some data that is more active than other data, and it is not coincidentally, the radical data is allocated to the same shard, at this time, the header is too big. We cannot balance the load by transferring hotspot data. At this time, we use the "Law of big numbers" and what is the "Law of big numbers? In a word, it is as follows: "A large enough sample can almost certainly reflect the real composition of the whole", detailed principles, Google, if the data size of each shard is small, according to the law of large numbers, it will be easier spread hotspot data to different shards. In this case, cross-shard queries may exist, depending on how you perform tradeoff.