# Too many Indexes or Few indexes with lots of data?

**URL:** <https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901>\
**Category:** Elasticsearch\
**Created:** [May 8, 2017, 8:33am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901 "2017-05-08T08:33:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkesh26](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alkesh26](https://discuss.elastic.co/u/alkesh26)\
**Post date:** [May 8, 2017, 8:33am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/1 "2017-05-08T08:33:20Z")

</div>

We have an use case where we store data in indexes month wise. For eg. if I have created few blog posts in April 2017 it will be stored in index named as 'abc\_2017.04'. So even if I write 100 blogs in april it will get stored in 'abc\_2017.04' and for different months it will get stored in corresponding month wise indexes.

Another approach which we think of is to create 6 month indexes so if I write blog posts in first 6 months of year it will go in for eg., 'abc\_2017.01-06'. But this index will then be having lots of data.

Which approach is better? Creating month wise indexes or creating few indexes and storing whole data in those few indexes?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [May 8, 2017, 9:21am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/2 "2017-05-08T09:21:38Z")

</div>

How much data do you have? 100 or even 10000 blogs per month doesn't sound like much. At that rate you could probably put a whole year or more in a single index (with a replica for availability) and still not have any issues.

The volume of data is pretty important answer such questions.

Rob

---

<div class="post-metadata">

**Author:** ![alkesh26](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alkesh26](https://discuss.elastic.co/u/alkesh26)\
**Post date:** [May 8, 2017, 9:27am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/3 "2017-05-08T09:27:27Z")

</div>

Hey Robert,

As of now per month we have around 10,000 to 30,000 blogs. So if I create six month index and think of the maximum blogs stored as per current data I will have 1,80,000 posts data in the index.  
What should be the limit of number of records in a given index ideally for this use case?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [May 8, 2017, 9:37am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/4 "2017-05-08T09:37:42Z")

</div>

Of course it depends on how big those blogs are. Basically you should avoid a lot of small indexes \<1GB, as well as big indexes \>20GB. If I was in your situation I would probably aim for somewhere around 5GB, monitor performance of the system and adjust later if needed. Keep in mind that you can later reindex your data if necessary.

Rob

---

<div class="post-metadata">

**Author:** ![alkesh26](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alkesh26](https://discuss.elastic.co/u/alkesh26)\
**Post date:** [May 8, 2017, 9:40am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/5 "2017-05-08T09:40:36Z")

</div>

Thanks for the quick reply. Really helpful.

---

<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:** [June 5, 2017, 9:50am UTC](https://discuss.elastic.co/t/too-many-indexes-or-few-indexes-with-lots-of-data/84901/6 "2017-06-05T09:50:58Z")

</div>

Closed on June 5, 2017, 9:50am UTC

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