Title
#users-public
y

Yair

08/27/2022, 12:26 AM
Hey guys, quick question: when configuring
cairo.index.value.block.size
in the configuration file, Does it apply for the WHOLE Table? or ONLY Per Partition? Thank you!
Andrey Pechkurov

Andrey Pechkurov

08/27/2022, 6:28 AM
Hi Yair, No, it sets the default value which applies to each newly created index individually. So, when you create an index without specifying the block size (a.k.a. index capacity), the default value is read from the config and stored in the table metadata. One more thing to mention is that I'd suggest keeping the default (256) value since it provides optimal performance or, if you really need to change this setting, make sure to measure performance of your ingestion and queries that use the index.
y

Yair

08/27/2022, 8:01 AM
Thanks for the reply! I did try a few different values and don't see much difference, but I haven't imported most of the table yet.
8:03 AM
I guess my a better way to ask my question is:, considering the example from your docs:
<https://questdb.io/docs/reference/sql/create-table/#column-indexes>
, would it make any difference if the table is partitioned by day, month, year, or not partitioned at all?
Andrey Pechkurov

Andrey Pechkurov

08/27/2022, 8:08 AM
It shouldn't make a big difference, but the wrong partition strategy may slow down ingestion speed in case of out-of-order writes.
8:11 AM
Ideally, each of your partitions should hold a few tens million records. Having them way bigger than that would mean expensive partition rewrites.
8:12 AM
As for that index, the partition strategy shouldn't make a big difference.
y

Yair

08/27/2022, 8:14 AM
Thanks for your help! I have tables with millions of rows each day (I'll have very few unique values in the index but lots of rows). I'm making sure I ingest them in the right order and very happy with the ingestion and querying speeds so far. Tried Influx before and was very disappointed.. I was just worried about how to optimize the table (for reading mostly) since it's only going to grow. Partitioned by day sounds perfect for me according to your numbers, just wasn't sure about the index capacity
8:14 AM
Thank you!