# How to get the time a query spends in the queue before the shards receives the query

**URL:** <https://discuss.elastic.co/t/how-to-get-the-time-a-query-spends-in-the-queue-before-the-shards-receives-the-query/306897>\
**Category:** Elasticsearch\
**Created:** [June 10, 2022, 1:58pm UTC](https://discuss.elastic.co/t/how-to-get-the-time-a-query-spends-in-the-queue-before-the-shards-receives-the-query/306897 "2022-06-10T13:58:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivam\_agrawal1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivam_agrawal1/32/106851_2.png) [@shivam\_agrawal1](https://discuss.elastic.co/u/shivam_agrawal1)\
**Post date:** [June 10, 2022, 1:58pm UTC](https://discuss.elastic.co/t/how-to-get-the-time-a-query-spends-in-the-queue-before-the-shards-receives-the-query/306897/1 "2022-06-10T13:58:34Z")

</div>

The took\_millis in Elasticsearch slow logs tells the time it takes on execution on the shard level, it does not encounter the time it spends in the queue. How to get the time. a query spends in the queue before it is passed on to the shards.  
And what exactly is took in the response body of a query, can someone give a detailed explanation of the took parameter like which all times are included in 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:** [July 8, 2022, 1:58pm UTC](https://discuss.elastic.co/t/how-to-get-the-time-a-query-spends-in-the-queue-before-the-shards-receives-the-query/306897/2 "2022-07-08T13:58:51Z")

</div>

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