Hi :wave: Please advice a better solution for a pr...
# general
v
Hi 👋 Please advice a better solution for a pretty standard case. I have a table:
Copy code
dim1, dim2, dim3, dim4, daysSinceEpoch, hoursSinceEpoch, metric
I need to query
sum(metric)
grouped by days OR by hours with optional dimensions. Cardinality of dimensions is pretty low: from 3 to few hundreds unique values. I decided to use star-tree index for that. Is having both
daysSinceEpoch
and
hoursSinceEpoch
in
dimensionsSplitOrder
a good approach here?
Copy code
"dimensionsSplitOrder": [dim1, dim2, dim3, dim4, daysSinceEpoch, hoursSinceEpoch]
TTL of data is 3 months.
j
This sounds similar to my question: https://apache-pinot.slack.com/archives/C01H1S9J5BJ/p1681538176648699?thread_ts=1681538176.648699&cid=C01H1S9J5BJ Interested to hear what suggestions you get
j
Since the TTL is only 3 months the max number of unique values would be around 2k which is low so should be safe to add both Hours/Days as dimensions in ST index.
v
got it! Thank you
how may I check that ST index is used for a specific query?
j
thanks 1
j
Would be great to see an example of how
daysSinceEpoch
is calculated. Is this done using an Ingestion Transformation?
j
Yes you can use ingestion transformation to calculate this field using this function (https://docs.pinot.apache.org/configuration-reference/functions/toepoch)
thankyou 1