# Really slow speed search ES 7.8

**URL:** <https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191>\
**Category:** Elasticsearch\
**Created:** [July 14, 2020, 8:30pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191 "2020-07-14T20:30:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shryx\_Cetus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shryx_cetus/32/45343_2.png) [@Shryx\_Cetus](https://discuss.elastic.co/u/Shryx_Cetus)\
**Post date:** [July 14, 2020, 8:30pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/1 "2020-07-14T20:30:12Z")

</div>

hi guys, i just starting with ES 7.8 and i'm getting really slow search perfoming, i'm loading data from mysql to ES with this structure:

[https://paste.ofcode.org/pmYEUVmWGKGvwxr2FEJZvz](https://paste.ofcode.org/pmYEUVmWGKGvwxr2FEJZvz)

and i'm trying to read it from php with this code:

[https://paste.ofcode.org/33JmCWw3zB3wbPJ8iCNkBbm](https://paste.ofcode.org/33JmCWw3zB3wbPJ8iCNkBbm)

i just run it for 40 minutes and didn't end 😔

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [July 16, 2020, 6:22am UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/2 "2020-07-16T06:22:30Z")

</div>

Can you run your query in Kibana (or cURL) to see how it performs, or limit it more to get any data? What's going on with the cluster during the search, i.e. CPU, any GC, etc.? Turn monitoring on and you can also profile a query in Kibana.

---

<div class="post-metadata">

**Author:** ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)\
**Post date:** [July 17, 2020, 6:45am UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/3 "2020-07-17T06:45:44Z")

</div>

@Shryx_Cetus  
How many matches are you expecting?

---

<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:** [July 17, 2020, 6:48am UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/4 "2020-07-17T06:48:23Z")

</div>

Why are you using a size of 10? What happens if you increase this to 1000 or 10000?

---

<div class="post-metadata">

**Author:** ![Shryx\_Cetus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shryx_cetus/32/45343_2.png) [@Shryx\_Cetus](https://discuss.elastic.co/u/Shryx_Cetus)\
**Post date:** [July 19, 2020, 1:57pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/5 "2020-07-19T13:57:57Z")

</div>

hi Christian, thank for you answer, i change the size to 10000 and it's more faster, but it's still slow, i'm getting something like a read of 30000 documents every 0,3 seconds

---

<div class="post-metadata">

**Author:** ![Shryx\_Cetus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shryx_cetus/32/45343_2.png) [@Shryx\_Cetus](https://discuss.elastic.co/u/Shryx_Cetus)\
**Post date:** [July 19, 2020, 2:01pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/6 "2020-07-19T14:01:14Z")

</div>

Hi vinayak, thank for your answer, i'm expecting to match a maximun of 15 atributes and 1 range in this case a date.

---

<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:** [July 19, 2020, 2:07pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/7 "2020-07-19T14:07:38Z")

</div>

How many results are you expecting to match? What is the specification of your cluster? What type of disk/storage do you have?

---

<div class="post-metadata">

**Author:** ![Shryx\_Cetus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shryx_cetus/32/45343_2.png) [@Shryx\_Cetus](https://discuss.elastic.co/u/Shryx_Cetus)\
**Post date:** [July 19, 2020, 2:20pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/8 "2020-07-19T14:20:24Z")

</div>

hi steve, i test the query in kibana and i get a similar perform, for a other test i try to get a smaller size data and it took 0.3 in around of 30000 documents, i finally i test it with a biggest size of data and i'm get this monitoring

 ![Captura de pantalla de 2020-07-19 10-15-45](https://us1.discourse-cdn.com/elastic/original/3X/5/3/53dcbe2887c6ac04e34f17ea9d7b02c92aaf713a.png)

as a additional information, i'm trying to do something like a sum with a group by, for now, i'm just searching the data with the matching filtres and then sum and  
"group" with php, could be a best idea try an aggregation?

---

<div class="post-metadata">

**Author:** ![Shryx\_Cetus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shryx_cetus/32/45343_2.png) [@Shryx\_Cetus](https://discuss.elastic.co/u/Shryx_Cetus)\
**Post date:** [July 19, 2020, 2:30pm UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/9 "2020-07-19T14:30:26Z")

</div>

hi christian, i'm expeting to match all, because it's posible to get a report which except all the data(4.8 mill of documents), for know, i'm testing it in a personal computer it have a 16gb ram, i7 4700m with a 256 gb ssd, for now i didn't testing in a server because i didn't have it 😅

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [July 20, 2020, 2:22am UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/10 "2020-07-20T02:22:29Z")

</div>

Well, RAM/Disk okay so seems CPU bound, suggest you profile the query in Kibana (I've not done that much, so can't help much) to see how you might improve it.

---

<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:** [August 17, 2020, 2:22am UTC](https://discuss.elastic.co/t/really-slow-speed-search-es-7-8/241191/11 "2020-08-17T02:22:35Z")

</div>

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