# Performance querying time-based indices in a date range

**URL:** <https://discuss.elastic.co/t/performance-querying-time-based-indices-in-a-date-range/238283>\
**Category:** Elasticsearch\
**Created:** [June 23, 2020, 2:42pm UTC](https://discuss.elastic.co/t/performance-querying-time-based-indices-in-a-date-range/238283 "2020-06-23T14:42:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![itizir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itizir/32/63552_2.png) [@itizir](https://discuss.elastic.co/u/itizir)\
**Post date:** [July 6, 2020, 10:16am UTC](https://discuss.elastic.co/t/performance-querying-time-based-indices-in-a-date-range/238283/3 "2020-07-06T10:16:38Z")

</div>

Oh btw, if you investigate the performance of time range filters, I'd be interested to hear whether you also see this...

> [@@timestamp field slow range query "DocValuesFieldExistsQuery"](https://discuss.elastic.co/t/timestamp-field-slow-range-query-docvaluesfieldexistsquery/234995):
>
> Hi! I was profiling my queries and I run into this: According to [this](https://discuss.elastic.co/t/time-range-query-performance-7-6/223194/16) thread there's isn't anything I can do to avoid this behavior and it seems that the newest ES version has older Lucene version (8.5) which doesn't have the [fixed issue](https://issues.apache.org/jira/browse/LUCENE-9287) (since it's very recent). The field is mapped as 'date', ES version: 7.2.1. Edit: The daily index in question has 6 shards and the total avg size is ~260GB and has ~600M documents. The timestamp in the event is in seconds. Thanks!

> [@Time range query performance \[7.6\]](https://discuss.elastic.co/t/time-range-query-performance-7-6/223194/15):
>
> I am afraid you cannot disable parts on the query cache. On the other hand, I have discussed this behaviour with other people and we agreed that we should not cache DocValuesFieldExistsQuery as the query is already very fast and the overhead makes little sense. This has been already fixed in the upstream project: [https://issues.apache.org/jira/browse/LUCENE-9287](https://issues.apache.org/jira/browse/LUCENE-9287)

---

_[View the full topic](https://discuss.elastic.co/t/performance-querying-time-based-indices-in-a-date-range/238283)._
