# Performance - Routing vs separate index

**URL:** <https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087>\
**Category:** Elasticsearch\
**Created:** [December 7, 2011, 12:31pm UTC](https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087 "2011-12-07T12:31:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arxisos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arxisos/32/3048_2.png) [@Arxisos](https://discuss.elastic.co/u/Arxisos)\
**Post date:** [December 7, 2011, 12:31pm UTC](https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087/1 "2011-12-07T12:31:12Z")

</div>

Hi,

it would be nice to know if there is any performance difference if using a  
separate index instead of a simple routing mechanism.  
I've got following situation: Two different document types, but same  
mapping definition.

So I'm curios which option fits the best for my needs:

- Separate index for each document type
- Same index, but different index types (with same mappings)
- Same Index and same index type, but routing (?routing={DocumentType})

Is there any difference in performance or are there any other advantages or  
disadvantages? What would you recommend?

Thanks!

---

<div class="post-metadata">

**Author:** ![Arxisos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arxisos/32/3048_2.png) [@Arxisos](https://discuss.elastic.co/u/Arxisos)\
**Post date:** [December 7, 2011, 12:48pm UTC](https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087/2 "2011-12-07T12:48:03Z")

</div>

I most note that the document types will mostly be searched separately.  
That's the reason why I'm asking.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 7, 2011, 4:05pm UTC](https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087/3 "2011-12-07T16:05:52Z")

</div>

It does not sounds like option 3 (routing) would be the correct one, since  
it will force all the documents of a specific type to be in the same shard.

When they exist in the same index, then a query executes against all the  
content and filtered (but highly cached) based on the type. If its in a  
separate index, then there is no need to filter. So, different indices will  
be faster.

On Wed, Dec 7, 2011 at 2:48 PM, Arxisos [arxisos@googlemail.com](mailto:arxisos@googlemail.com) wrote:

> I most note that the document types will mostly be searched separately.  
> That's the reason why I'm asking.

---

<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:46am UTC](https://discuss.elastic.co/t/performance-routing-vs-separate-index/6087/4 "2017-07-06T03:46:12Z")

</div>

Closed on July 6, 2017, 3:46am UTC


