# Weird problem with routing performance

**URL:** <https://discuss.elastic.co/t/weird-problem-with-routing-performance/22096>\
**Category:** Elasticsearch\
**Created:** [February 11, 2015, 2:59pm UTC](https://discuss.elastic.co/t/weird-problem-with-routing-performance/22096 "2015-02-11T14:59:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bizzorama](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bizzorama](https://discuss.elastic.co/u/bizzorama)\
**Post date:** [February 11, 2015, 2:59pm UTC](https://discuss.elastic.co/t/weird-problem-with-routing-performance/22096/1 "2015-02-11T14:59:22Z")

</div>

Hi all,

i have a weird (at least in my oppinion) situation on my environment.

my hardware:  
3 data nodes with 32GB of ram (16GB of Java heap for ES)

using data from logstash, stored per day manner  
with 360 5_shard + 1 replica indexes -_ NO ROUTING _-\> grouped by alias  
named_ norouting\*  
and same indexes (different names of course) reindexed with new mapping:  
and 360 4_shard + 1 replica indexes - WITH ROUTING \* -\> grouped by alias  
named routing_

about _2 billions of docs,  
about 0.8 TB_ of data

I have 4 customers that I want to split to their own indices by routing to  
increase performance when querying the whole year of data.  
3 customers are similar size, and one is about 2x times larger than others.

When I performed tests (I cleared the cache with \_cache/clear before each  
query)

Simple query that I was using for indexes with routing:

* * *

/_routing_/\_search?routing=CUSTOMER1  
{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"term": {  
"Customer.raw": "CUSTOMER1"  
}  
}  
}  
}  
}

result: _360 indices read, 18 sec response_

* * *

and the indexes without routing

/_norouting_/\_search  
{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"term": {  
"Customer.raw": "CUSTOMER1"  
}  
}  
}  
}  
}

result: _1800 indices read, 7 sec response_

_... no matter which customer I want to find, results are similar,  
searching with routing is always almoust 2.5 times slower !_

This does not make any sense ... should be opposite in my oppinion.  
Any help would be much appreciated !. After I've read about routing I was  
happy and hoping I could speed up the queries without adding additional  
hardware ... now I'm very sceptical.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/eb1ab06d-f738-4b5e-a333-710f3b26b30a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eb1ab06d-f738-4b5e-a333-710f3b26b30a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:33am UTC](https://discuss.elastic.co/t/weird-problem-with-routing-performance/22096/2 "2017-07-06T00:33:29Z")

</div>


