# Elasticsearch as a primary Mysql database

**URL:** <https://discuss.elastic.co/t/elasticsearch-as-a-primary-mysql-database/236757>\
**Category:** Elasticsearch\
**Created:** [June 11, 2020, 5:03pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-primary-mysql-database/236757 "2020-06-11T17:03:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arash\_Soft](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arash_soft/32/45618_2.png) [@Arash\_Soft](https://discuss.elastic.co/u/Arash_Soft)\
**Post date:** [June 11, 2020, 5:03pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-primary-mysql-database/236757/1 "2020-06-11T17:03:40Z")

</div>

hi  
there is a past topic like this but i want to know what is the solution after 4 years  
now i use mysql and i have like 6000000 row per table and high request per second and i use slim framework to build my app  
because of lots of queries and request my app goes slow  
what is your suggestion?

---

<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:** [June 11, 2020, 7:38pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-primary-mysql-database/236757/2 "2020-06-11T19:38:07Z")

</div>

I shared most of my thoughts there: [http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/](http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

Have also a look at this ["live coding" recording](https://www.elastic.co/fr/blog/how-to-add-powerful-search-existing-sql-applications-elasticsearch-video-tutorial).

---

<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:** [July 9, 2020, 7:38pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-primary-mysql-database/236757/3 "2020-07-09T19:38:09Z")

</div>

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