What is a reasonable maximum for JSON's max_dynamic_paths?
#76106
Answered
by
Avogar
martijnthe
asked this question in
Q&A
|
The default value for In our use case, a multi-tenant observability/logging system, our customers create the keypaths. We have little control over them. At the moment, we've got ~25K unique paths in the dataset. If we would keep the default of 1024, the suboptimal, fallback column would get used ~24K paths... The doc says:
At what number of subcolumns would the table become unstable? If the answer is, "it depends", what does it depend on? Note: we are using ClickHouse Cloud. |
Answered by
Avogar
Feb 17, 2025
Replies: 1 comment 4 replies
|
@Avogar do you perhaps have any guidance for us? thank you 🙏 |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! The tradeof in number of subcolumns is the following: the more subcolumns, the more files are created in the filesystem (in cloud it's S3) and the more memory is used during inserts and merges. Also in cloud we store paths to the files in Keeper, so in cloud there is also a tradeof: the more files created in data part, the more load to keeper during inserts and merges (so also number of tables with JSON can be important for keeper load).
Memory usage is increased with number of files increasing because for each file we create a write buffer that buffers some data and flushes it to the filesystem when it's full. And for S3 there are requirements for minimums size of such chunk during m…