# Replicas reduce performance complex queries drastically?

**URL:** <https://discuss.elastic.co/t/replicas-reduce-performance-complex-queries-drastically/148310>\
**Category:** Elasticsearch\
**Created:** [September 12, 2018, 11:40am UTC](https://discuss.elastic.co/t/replicas-reduce-performance-complex-queries-drastically/148310 "2018-09-12T11:40:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [September 14, 2018, 9:08am UTC](https://discuss.elastic.co/t/replicas-reduce-performance-complex-queries-drastically/148310/4 "2018-09-14T09:08:13Z")

</div>

> [@cdekker](#):
>
> all routing is done in a uniform-random round-robin style.

When a shard is held on only one node (ie one primary, no replicas) any caching (eg file-system level or segment level) will make returning queries faster.  
When you have replicas your queries will be randomized across replicas, some of which will have empty caches for your query and others warmed.

You can use a client session ID as the custom value in the [preference setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html) to route queries back to the same replica where possible to gain the benefits of a warm cache

---

_[View the full topic](https://discuss.elastic.co/t/replicas-reduce-performance-complex-queries-drastically/148310)._
