Sharding
Default shards
Distribution can have a default shard. It means that if router matches query to distribution with default shard it definitely find route. It route will be to this shard.
Default shard is realized as “key range” with minimal value of column set. This key range have reserved id <DistributionId>
.DEFAULT.
For example:
Column set for distribution is [varchar, integer]. Lower bound of default key range is ["",-9223372036854775808]
How to use it?
We have the distribution with key range kr18b713215 “From 0”. Try alter distribution with default shard command:
result:
The default shard functionality is supported for the ‘integer’, ‘unsigned integer’, and ‘varchar’ types, as well as hash-based routing.