How does the memory allocated for every partition in singlestore database. Does it be the size of partition size isf the total number of rows in all tables and the storage size increases automatically while the data is growing or is it fixed?
I’m not sure I fully understand your question. Memory is allocated to partitions as needed. So, for example if you created a database with X partitions per leaf and then created some in-memory rowstore tables in those partitions, memory would be allocated as data was inserted into the rowstore tables at each partition (based on the shard key of the table). There are no upfront memory allocations per-partition if that is what your asking (there are some upfront disk allocations per-partition for transaction logs). For columnstore tables the data kept in memory at each partition is based on the data that is most heavily queried at each partition.
Hi Adam thanks for your response. So what I am trying to ask is how to allocate the number of partitions for each database.
The key factors for partition count are the number of CPU cores on the leaf (the default is one partition per core) along with the type of workload you intend to run. More complex longer running queries will get more parallelism (and run faster) with a higher partition count. For lower latency (and higher throughput) queries (say queries running in 100s of ms), more partition will usually slow them down (better off doing more work across fewer partitions).
There is some more info here: