# How many indexes is too many indexes

**URL:** <https://discuss.elastic.co/t/how-many-indexes-is-too-many-indexes/98401>\
**Category:** Elasticsearch\
**Created:** [August 25, 2017, 5:15pm UTC](https://discuss.elastic.co/t/how-many-indexes-is-too-many-indexes/98401 "2017-08-25T17:15:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lauraerinmann](https://avatars.discourse-cdn.com/v4/letter/l/53a042/32.png) [@lauraerinmann](https://discuss.elastic.co/u/lauraerinmann)\
**Post date:** [August 25, 2017, 5:15pm UTC](https://discuss.elastic.co/t/how-many-indexes-is-too-many-indexes/98401/1 "2017-08-25T17:15:53Z")

</div>

I recently decided that it might be a good idea to change the structure of our elasticsearch indexes for performance. Right now we have a single index and two types and our corresponding graph has a database for each “project”. Though they aren’t added that often its possible that a infinite number of projects could be added in the future.  
Logically it makes sense that each index in ES should be a ‘project’, but that seems to counter the documentation “For that reason, a single large index is more efficient than several small indices: the fixed cost of the Lucene index is better amortized across many documents.” I'm confused on how to optimize our performance. Any suggestions?  
Thanks!  
Edit: I'd like to add that we don't know how large a index will become when we create it (so balancing the shards is also a issue).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 26, 2017, 9:57am UTC](https://discuss.elastic.co/t/how-many-indexes-is-too-many-indexes/98401/2 "2017-08-26T09:57:04Z")

</div>

It's really shards that are the (potential) problem. If you have \>400 (that's a pretty vague and rough number based on annecdata) per node you will be wasting heaps of heap on maintaining those.  
Basically `_shrink` is your friend here, you can start relatively large and then reduce the shard count.

Back to your domain though - what sort of data is this?

---

<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:** [September 23, 2017, 9:57am UTC](https://discuss.elastic.co/t/how-many-indexes-is-too-many-indexes/98401/3 "2017-09-23T09:57:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
