# Elasticsearch performance questions

**URL:** <https://discuss.elastic.co/t/elasticsearch-performance-questions/17900>\
**Category:** Elasticsearch\
**Created:** [June 4, 2014, 8:50am UTC](https://discuss.elastic.co/t/elasticsearch-performance-questions/17900 "2014-06-04T08:50:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandra/32/1521_2.png) [@Alexandra](https://discuss.elastic.co/u/Alexandra)\
**Post date:** [June 4, 2014, 8:50am UTC](https://discuss.elastic.co/t/elasticsearch-performance-questions/17900/1 "2014-06-04T08:50:19Z")

</div>

Hei,

I'm currently struggling with understanding how es works.

- if i make a search a lot of times with the same bool query, will it be optimized ? does es have some kind of caching mechanism ? my query has a couple of parameters, between which some ids. if I change one id at each search, will it be slower than leaving the query unchanged ?

- I quess searching is just not very clear to me, sorry if this is a dump question.

- I've noticed that the less shards a node holds, the less memory it consumes; what is the dropdown of adding more nodes then, besides the networking; I'm trying to decide if I should add 3 or 5 nodes for a production cluster

- I've noticed than when indexing/querying a cluster, the heap memory used goes up until a certain point when it goes down again; I couldn't connect this with the garbage collector's actions; is it the lucene merging process or something else? can someone please explain to me what I'm missing ?

---

<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, 1:24am UTC](https://discuss.elastic.co/t/elasticsearch-performance-questions/17900/2 "2017-07-06T01:24:47Z")

</div>


