This message was deleted.
# troubleshooting
s
This message was deleted.
g
this is not answering your question directly, but have you looked at druid's new json column feature? https://druid.apache.org/docs/latest/querying/nested-columns.html
it's a good way to deal with sparse stuff like the
qualifiers
map in your sample record
l
I’ve read about json column some time ago, but I wasnt considering it as I’m hoping to run queries like
Copy code
select qualifiers, count(*), count(distinct id) uniqueIds
from table
where qualifiers = 'type1=value1'

[type1=value1, type2=value2, type17=value17]  | 17 | 10
[type1=value1, type3=value3, type17=value34]  |  3 |  3
[type1=value1, type8=value2, type17=value34]  | 11 | 10
g
with json columns that'd be
Copy code
SELECT qualifiers, count(*), count(distinct id) uniqueIds
FROM table
WHERE JSON_VALUE(qualifiers, '$.type1') = 'value1'`
the json columns are internally indexed so this is about as fast as the MV string approach
l
interesting, I was expecting MV approach to be like much faster due to the bitmap indexing.
the json approach is much more flexible, if it’s also as fast as the MV, it’s kinda a nobrainer. I’ll test it.
g
hope it works well for you! yeah, we put a lot of effort into making the JSON column implementation in many cases just as speedy as not using JSON columns. since the API is so nice we want people to be able to use it without worrying about perf
l
Does it work with roll ups and LATEST functions?
l
It’s working very well so far! Haven’t tried under heavy load or fancy queries yet, but so far so good
g
nice 👍
great to hear!