# Is Daily-Index better than Monthly-Index

**URL:** <https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863>\
**Category:** Elasticsearch\
**Created:** [April 26, 2020, 6:17pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863 "2020-04-26T18:17:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffzhao](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jeffzhao](https://discuss.elastic.co/u/jeffzhao)\
**Post date:** [April 26, 2020, 6:17pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/1 "2020-04-26T18:17:44Z")

</div>

Hi,

My Elasticsearch index is time-based: one index per month at this scale:

- number of Documents: 100M
- Size: 125 GB

The index was created with 12 shards + 2 replicas.

Since the date range for most of my user's search requests are only across 2-3 days, does it make sense to create one index per day and use alias to join them? Will this improve query performance?

---

<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:** [April 27, 2020, 10:58pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/2 "2020-04-27T22:58:49Z")

</div>

> [@jeffzhao](#):
>
> The index was created with 12 shards + 2 replicas.

That's probably too much for that amount of data.

Look at using ILM instead.

---

<div class="post-metadata">

**Author:** ![jeffzhao](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jeffzhao](https://discuss.elastic.co/u/jeffzhao)\
**Post date:** [April 28, 2020, 12:46am UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/3 "2020-04-28T00:46:56Z")

</div>

This is just for 1-month of data. We have kept 5-years of such data. Is it too much?

Also, what's the rule to determine the number of shards?

---

<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:** [April 28, 2020, 1:05am UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/4 "2020-04-28T01:05:28Z")

</div>

It really depends, but we suggest no more than 30-50GB per shard.

---

<div class="post-metadata">

**Author:** ![jeffzhao](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jeffzhao](https://discuss.elastic.co/u/jeffzhao)\
**Post date:** [April 28, 2020, 1:16pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/5 "2020-04-28T13:16:57Z")

</div>

One more information I forgot to mention: our Elasticsearch cluster has 24 nodes. Is it still too much for one index to have 12 shards + 2 replicas?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 28, 2020, 1:49pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/6 "2020-04-28T13:49:57Z")

</div>

May I suggest you look at the following resources about sizing:

[https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing](https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing)

> **[How many shards should I have in my Elasticsearch cluster?](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> If you are looking for practical guidelines around how many indices and shards to have in your cluster, this blog post will help you avoid common pitfalls.

https://www.slideshare.net/slideshow/embed_code/key/vR0XKDq4TGa77z

And [https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right](https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right)

---

<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:** [May 26, 2020, 1:50pm UTC](https://discuss.elastic.co/t/is-daily-index-better-than-monthly-index/229863/7 "2020-05-26T13:50:02Z")

</div>

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