From efe7669af9da96b8cb900d0783fe65d563f191ae Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Thu, 23 Jun 2016 10:54:06 +0200 Subject: [PATCH] Manual polishing. --- .../Books/Manual/Administration/Sharding/README.mdpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Books/Manual/Administration/Sharding/README.mdpp b/Documentation/Books/Manual/Administration/Sharding/README.mdpp index 9ffc2369bc..b94a8eb453 100644 --- a/Documentation/Books/Manual/Administration/Sharding/README.mdpp +++ b/Documentation/Books/Manual/Administration/Sharding/README.mdpp @@ -9,7 +9,7 @@ be distributed to multiple machines. Shards are configured per collection so multiple shards of data form the collection as a whole. To determine in which shard the data is to be stored ArangoDB performs a hash across the values. By default this hash is being created from _key. -To configure the amount of shards: +To configure the number of shards: ``` 127.0.0.1:8529@_system> db._create("sharded_collection", {"numberOfShards": 4}); @@ -21,4 +21,4 @@ To configure the hashing: 127.0.0.1:8529@_system> db._create("sharded_collection", {"numberOfShards": 4, "shardKeys": ["country"]}); ``` -This would be useful to keep data of every country in one shard which would result in better performance for queries working on a per country base. You can also specify multiple `shardKeys`. \ No newline at end of file +This would be useful to keep data of every country in one shard which would result in better performance for queries working on a per country base. You can also specify multiple `shardKeys`. Note however that if you change the shard keys from their defailt `["_key"]`, then finding a document in the collection by its primary key involves a request to every single shard. Furthermore, in this case one can no longer prescribe the primary key value of a new document but must use the automatically generated one. This latter restriction comes from the fact that ensuring uniqueness of the primary key would be very inefficient if the user could specify the primary key.