# When does the IdCache refreshes/clears/times-out? (has\_child query)

**URL:** <https://discuss.elastic.co/t/when-does-the-idcache-refreshes-clears-times-out-has-child-query/8834>\
**Category:** Elasticsearch\
**Created:** [August 23, 2012, 5:47pm UTC](https://discuss.elastic.co/t/when-does-the-idcache-refreshes-clears-times-out-has-child-query/8834 "2012-08-23T17:47:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_lopez/32/2754_2.png) [@Alex\_Lopez](https://discuss.elastic.co/u/Alex_Lopez)\
**Post date:** [August 23, 2012, 5:47pm UTC](https://discuss.elastic.co/t/when-does-the-idcache-refreshes-clears-times-out-has-child-query/8834/1 "2012-08-23T17:47:54Z")

</div>

Hi!

We are having some problems here and running into the performance penalty  
described in this topic:

[https://groups.google.com/d/topic/elasticsearch/K4IBHNfAcnk/discussion](https://groups.google.com/d/topic/elasticsearch/K4IBHNfAcnk/discussion)

Our has\_child query is executed into an index with 13M docs (5 evenly  
distributed shards, 1 node) and some doc updates (not that much, 10-100 per  
minute), and sometimes takes more than 20 minutes (I'm assuming we run here  
into the idCache refreshing itself). After this long queries, the following  
queries are fast. But after some time without queries (2 hours), we run  
again into a slow query again.

Could it be that the idCache has some timeOut after which it clears itself  
and thus it has to be regenerated?

Could someone kindly explain how does ES manage idCache expiration and  
refresh? Is there some config (memory related or other) that we can tweak  
to have better performance on this issue, or otherwise control how the  
idCache is managed?

We are using 0.19.1, should we update to 0.19.8?

I really appreciate any feedback on this issues.

Regards.

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:15am UTC](https://discuss.elastic.co/t/when-does-the-idcache-refreshes-clears-times-out-has-child-query/8834/2 "2017-07-06T03:15:17Z")

</div>


