This message was deleted.
# troubleshooting
s
This message was deleted.
j
If your only filter is on __time and you want to be able to filter by year or month, then I would think to have segment granularity at the month level. To your last question -- if you are willing to denormalize a bit and add more filter conditions, you could create a new field 'month_num' and range partition on it to take advantage of secondary pruning, and potentially perfect rollup for your group bys.
d
Hi @John Kowtko thank you. When you say 'month_num', you mean 01 for Jan etc? For example, 2019-01-31 will have 'month_num' as 01?
also could you give an example of range partition using month_num please?
j
Hi @D K, yes that's what I was thinking, generate a column that contains the numeric value for month, then you could issue queries with where conditions like "... and month between 1 and 3 ..." For the example I just copied from the Druid doc page and modified the columns, e.g.:
Copy code
"partitionsSpec": {
  "type": "range",
  "partitionDimensions": ["month_num"],
  "targetRowsPerSegment": 5000000
}
Although I would recommend looking for other secondary columns you would also filter on along with month_num, and add those to the list.