# Slow queries

**URL:** <https://discuss.elastic.co/t/slow-queries/241723>\
**Category:** Elasticsearch\
**Created:** [July 17, 2020, 8:46pm UTC](https://discuss.elastic.co/t/slow-queries/241723 "2020-07-17T20:46:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liron\_gofberg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liron_gofberg/32/59823_2.png) [@liron\_gofberg](https://discuss.elastic.co/u/liron_gofberg)\
**Post date:** [July 17, 2020, 8:46pm UTC](https://discuss.elastic.co/t/slow-queries/241723/1 "2020-07-17T20:46:15Z")

</div>

I execute a simple term filter query and I limit my results with size  
but part of the queries have bad performance(search time in minutes) while other perform well(search time is very fast) with the same limit of results

what can make the search so slow ?

---

<div class="post-metadata">

**Author:** ![mayya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayya/32/83147_2.png) [@mayya](https://discuss.elastic.co/u/mayya)\
**Post date:** [July 17, 2020, 9:43pm UTC](https://discuss.elastic.co/t/slow-queries/241723/2 "2020-07-17T21:43:22Z")

</div>

Elasticsearch [profile](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html) API can be very helpful to understand which part of a query takes what time and why.

---

<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 14, 2020, 9:43pm UTC](https://discuss.elastic.co/t/slow-queries/241723/3 "2020-08-14T21:43:25Z")

</div>

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