# What is the maximum number of indices allowed in elasticsearch?

**URL:** https://discuss.elastic.co/t/what-is-the-maximum-number-of-indices-allowed-in-elasticsearch/302793
**Category:** Elasticsearch
**Created:** [April 20, 2022, 10:15am UTC](https://discuss.elastic.co/t/what-is-the-maximum-number-of-indices-allowed-in-elasticsearch/302793 "2022-04-20T10:15:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![raqeeb](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@raqeeb](https://discuss.elastic.co/u/raqeeb)
#### Post date: [April 20, 2022, 10:15am UTC](https://discuss.elastic.co/t/what-is-the-maximum-number-of-indices-allowed-in-elasticsearch/302793/1 "2022-04-20T10:15:30Z")

</div>

I am using MySQL for storing data in my software. We have to generate hundreds of reports using the data and it is taking more time when the size of data in increasing. For some reports it is taking 1 or 2 minutes. So we have decided to use NoSQL database instead of MySQL. We have decided to go with Elasticsearch.

In MySQL, we have different database for each client and inside each database there are more than 50 tables. When coming to Elasticsearch, I am not able to group indices under a database. So I have decided to create separate index with placing client name as prefix. For example in MySQL there are 2 databases named `ABC` , `DEF` and a table inside both named `ledger` . The same thing done in Elasticsearch is by creating an index with name `ABC_ledger` and `DEF_ledger` .

In MySQL a single client database has 50 tables so when converting to Elasticsearch it will be 50 index for a single client. So when new clients are added, an additional 50 indices will be created.

**My questions are** :

1. Is there any limit in number of indices we can create?
2. Is there any other way to implement above logic without creating separate indices?

---

<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 26, 2022, 1:39am UTC](https://discuss.elastic.co/t/what-is-the-maximum-number-of-indices-allowed-in-elasticsearch/302793/2 "2022-04-26T01:39:32Z")

</div>

Welcome to our community! 😃

There's no hardcoded limit for indices. You will find there's a soft and hard _shard limit_ though.

> [@raqeeb](#):
>
> 1. Is there any other way to implement above logic without creating separate indices?

You need to rethink your data structures. The best option will be to merge all the tables into a single document in Elasticsearch.

---

<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 24, 2022, 1:39am UTC](https://discuss.elastic.co/t/what-is-the-maximum-number-of-indices-allowed-in-elasticsearch/302793/3 "2022-05-24T01:39:47Z")

</div>

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