# Profile API/ Debugging Slow queries

**URL:** <https://discuss.elastic.co/t/profile-api-debugging-slow-queries/250800>\
**Category:** Elasticsearch\
**Created:** [October 2, 2020, 2:20pm UTC](https://discuss.elastic.co/t/profile-api-debugging-slow-queries/250800 "2020-10-02T14:20:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinav\_elk](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@abhinav\_elk](https://discuss.elastic.co/u/abhinav_elk)\
**Post date:** [October 2, 2020, 2:20pm UTC](https://discuss.elastic.co/t/profile-api-debugging-slow-queries/250800/1 "2020-10-02T14:20:23Z")

</div>

I am using  
Elastic Version Number - 5.6.16  
Lucene\_version - 6.6.1  
I have some slow queries running on production environment.  
Upon profiling the requests, and adding the total times of individual components on different shards, I get around 60-70ms  
but the 'took' parameter in the response shows me ~ 700 ms, and also the same time is almost there if i manually print the request time in the codebase itself, thus adding the network overhead time.  
Now i know that Profile API has limitations after reading the below article-  
[Profile API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html)  
But is there anyway to find out the time spent by the request in Queue phase, Search fetch phase, merging the responses from different shards on the coordinating node.  
Without these, i am stuck as to why the request is taking so much time.  
Cheers.

---

<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:** [October 30, 2020, 2:20pm UTC](https://discuss.elastic.co/t/profile-api-debugging-slow-queries/250800/2 "2020-10-30T14:20:34Z")

</div>

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