@@ -6,7 +6,7 @@ author: jonels-msft
6
6
ms.service : cosmos-db
7
7
ms.subservice : postgresql
8
8
ms.topic : how-to
9
- ms.date : 10/28 /2022
9
+ ms.date : 11/01 /2022
10
10
---
11
11
12
12
# Choose shard count
@@ -28,21 +28,22 @@ between **32 - 128** shards. For smaller workloads say <100 GB, you could start
28
28
32 shards and for larger workloads you could choose 64 or 128. This choice gives you
29
29
the leeway to scale from 32 to 128 worker machines.
30
30
31
- ### Real-time analytics use case
31
+ ## Real-time analytics use case
32
32
33
33
In the Real-Time Analytics use-case, shard count should be related to the total
34
34
number of cores on the workers. To ensure maximum parallelism, you should create
35
35
enough shards on each node such that there is at least one shard per CPU core.
36
36
We typically recommend creating a high number of initial shards, for example,
37
37
** 2x or 4x the number of current CPU cores** . Having more shards allows for
38
- * future scaling if you add more workers and CPU cores.
39
-
40
- However, keep in mind that for each query Citus opens one database connection
41
- per shard, and these connections are limited. Be careful to keep the shard
42
- count small enough that distributed queries won’t often have to wait for a
43
- connection. Put another way, the connections needed, `(max concurrent queries *
44
- shard count)`, shouldn't exceed the total connections possible in the
45
- system, ` (number of workers * max_connections per worker) ` .
38
+ future scaling if you add more workers and CPU cores.
39
+
40
+ Keep in mind that, for each query, Azure Cosmos DB for PostgreSQL opens one
41
+ database connection per shard, and that these connections are limited. Be
42
+ careful to keep the shard count small enough that distributed queries won’t
43
+ often have to wait for a connection. Put another way, the connections needed,
44
+ ` (max concurrent queries * shard count) ` , shouldn't exceed the total
45
+ connections possible in the system, `(number of workers * max_connections per
46
+ worker)`.
46
47
47
48
## Next steps
48
49
0 commit comments