# Warm Up effect on query performance

**URL:** <https://discuss.elastic.co/t/warm-up-effect-on-query-performance/8874>\
**Category:** Elasticsearch\
**Created:** [August 28, 2012, 7:52pm UTC](https://discuss.elastic.co/t/warm-up-effect-on-query-performance/8874 "2012-08-28T19:52:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sushant\_Shankar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sushant_shankar/32/2652_2.png) [@Sushant\_Shankar](https://discuss.elastic.co/u/Sushant_Shankar)\
**Post date:** [August 28, 2012, 7:52pm UTC](https://discuss.elastic.co/t/warm-up-effect-on-query-performance/8874/1 "2012-08-28T19:52:31Z")

</div>

I'm using v0.19 right now and plan to switch to v0.20 (where there's an  
automatic warm up of shards). I am doing some query optimization and  
performance testing. I find that after a few queries performance gets  
significantly better (from couple of minutes to seconds). These are filter  
queries containing ~10-1000 randomly generated keywords (there's a very  
small chance of the same query containing the same being issued again). Is  
this using the segment caches? Loading indices into memory?

I have found this effect mentioned in a few places, but am still not clear  
on why it works this way:  
a) Here[https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/x7REgAihCsw](https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/x7REgAihCsw),  
Shay mentions that doing 100-1000 queries to 'warm up' will help performance  
b) For ES v0.20, there's an automatic warm up[https://github.com/elasticsearch/elasticsearch/issues/1913](https://github.com/elasticsearch/elasticsearch/issues/1913)of shards.

Thanks!  
Sushant

--

---

<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:14am UTC](https://discuss.elastic.co/t/warm-up-effect-on-query-performance/8874/2 "2017-07-06T03:14:47Z")

</div>


