-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestgoPull requests that update Go codePull requests that update Go codespqr-console
Description
spqr-console=> HELP CREATE KEY RANGE;
CREATE KEY RANGE - creates a key range for query routing
Syntax:
CREATE KEY RANGE <id> FROM <bound> ROUTE TO <shard> FOR DISTRIBUTION <dist>
Examples:
-- For integer distribution:
CREATE KEY RANGE kr1 FROM 0 ROUTE TO shard1 FOR DISTRIBUTION users;
CREATE KEY RANGE kr2 FROM 1000000 ROUTE TO shard2 FOR DISTRIBUTION users;
-- For VARCHAR HASH (MURMUR):
-- MURMUR hashes to uint32 (0..4294967295)
CREATE KEY RANGE kr1 FROM 0 ROUTE TO shard1 FOR DISTRIBUTION answers;
CREATE KEY RANGE kr2 FROM 2147483648 ROUTE TO shard2 FOR DISTRIBUTION answers;
Tip: Use CREATE KEY RANGES AUTO for automatic distribution.Related to: #1887
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestgoPull requests that update Go codePull requests that update Go codespqr-console