# How do I check why my search query takes too long? Is there something like Explain command in SQL databases?

**URL:** <https://discuss.elastic.co/t/how-do-i-check-why-my-search-query-takes-too-long-is-there-something-like-explain-command-in-sql-databases/331029>\
**Category:** Elasticsearch\
**Created:** [April 28, 2023, 8:19am UTC](https://discuss.elastic.co/t/how-do-i-check-why-my-search-query-takes-too-long-is-there-something-like-explain-command-in-sql-databases/331029 "2023-04-28T08:19:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduard\_mart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eduard_mart/32/119729_2.png) [@Eduard\_mart](https://discuss.elastic.co/u/Eduard_mart)\
**Post date:** [April 28, 2023, 8:19am UTC](https://discuss.elastic.co/t/how-do-i-check-why-my-search-query-takes-too-long-is-there-something-like-explain-command-in-sql-databases/331029/1 "2023-04-28T08:19:52Z")

</div>

How do I check why my search query takes too long? Is there something like Explain command in SQL databases?

---

<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:** [April 28, 2023, 8:26am UTC](https://discuss.elastic.co/t/how-do-i-check-why-my-search-query-takes-too-long-is-there-something-like-explain-command-in-sql-databases/331029/2 "2023-04-28T08:26:05Z")

</div>

Have you looked at the [profile API](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/search-profile.html)?

---

<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 26, 2023, 8:26am UTC](https://discuss.elastic.co/t/how-do-i-check-why-my-search-query-takes-too-long-is-there-something-like-explain-command-in-sql-databases/331029/3 "2023-05-26T08:26:59Z")

</div>

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