Query Optimization

My query is something like: (dim1 == x OR dim1==y OR … ) AND (dim2==p OR dim2==q OR …).

I know that this can be easily queried using Timeseries queries.

  1. I wanted to know if I can improve the performance by defining some metrics at the indexing time ( just like hyperUnique aggregator improves the performance of cardinality aggregation).

  2. If yes, please give an example (metric/ aggregator in JSON format.)

Hi Saksham, you can improve query performance if you are able to roll up your data more aggressively.

Can you elaborate on that (probably an example)?

Please see:
http://druid.io/docs/latest/design/

The more you can do to roll up your data, the better query performance you should see as there is more data to scan. There are various methods you can use to improve rollup, for example, removing columns that impact rollup.