# Switching from index names to alias - performance impact?

**URL:** <https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633>\
**Category:** Elasticsearch\
**Created:** [January 17, 2022, 9:52pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633 "2022-01-17T21:52:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sale/32/100242_2.png) [@sale](https://discuss.elastic.co/u/sale)\
**Post date:** [January 17, 2022, 9:52pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/1 "2022-01-17T21:52:15Z")

</div>

We use Elasticsearch for time series data with indices created every day. We perform all operations (ingest, search etc) using the REST APIs. We keep 60-days worth of data available to query.

Currently, when we do search we specify the relevant indices in the GET call. Example when searching for data from Jan 01 to Jan 03, the GET call used is:

`GET es-nodes:9200/my-index-20220101,my-index-20220102,my-index-20220103/_search`

But we want to migrate to aliases and use those in search calls.  
`my-index` alias pointing to index-pattern `my-index-*`

My concern is, instead of previously querying only 3 indices, we would be querying 60 indices, will that be worse for performance?

Thanks for any insight.

---

<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:** [January 18, 2022, 4:28am UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/2 "2022-01-18T04:28:01Z")

</div>

Welcome to our community! 😃

Elasticsearch will manage this efficiently for you when it goes to the indices under the alias. You might want to look at migrating entirely to [ILM](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)btw 🙂

---

<div class="post-metadata">

**Author:** ![sale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sale/32/100242_2.png) [@sale](https://discuss.elastic.co/u/sale)\
**Post date:** [January 18, 2022, 3:24pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/3 "2022-01-18T15:24:41Z")

</div>

Thank you, I have read through the ILM - nice addition indeed.  
Currently, though I am stuck at an older version (5.5) and need to scale it before being able to upgrade.

But good to know that Elasticsearch will manage the aliases and routing the calls to relevant shards efficiently.

---

<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:** [January 18, 2022, 8:46pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/4 "2022-01-18T20:46:16Z")

</div>

Ahh 5.5 is pretty old, it's [EOL](https://www.elastic.co/support/eol) and no longer supported.  
I don't remember what 5.X does for this sorry.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 18, 2022, 8:50pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/5 "2022-01-18T20:50:53Z")

</div>

If I recall correctly the improvements and query rewriting was done in later releases, so using an alias pointing to all indices would most likely lead to worse performance or at least higher load on the cluster.

---

<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:** [February 15, 2022, 8:51pm UTC](https://discuss.elastic.co/t/switching-from-index-names-to-alias-performance-impact/294633/6 "2022-02-15T20:51:41Z")

</div>

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