MySQL Cluster does an automatic sharding/partitioning to the
tables across data nodes, enabling databases to scale
horizontally to serve read and write-intensive workloads, but
what is the default sharding key used in partitioning the
According to the recent update (Oct, 2016) of the MySQL Cluster white paper, primary key is the
default sharding key:
By default, sharding is based on hashing of the primary
key, which generally leads to a more even distribution
of data and queries across the cluster than alternative
approaches such as range partitioning.
However, that is not the case in all MySQL Cluster versions so
In this post, I’ll do some test cases on MySQL Cluster (of 4
datanodes) to confirm the default sharding key.
Testing on MySQL Cluster 7.2.26 …[Read more]