# Time taken to execute query fluctuates

**URL:** <https://discuss.elastic.co/t/time-taken-to-execute-query-fluctuates/243359>\
**Category:** Elasticsearch\
**Created:** [July 31, 2020, 1:20pm UTC](https://discuss.elastic.co/t/time-taken-to-execute-query-fluctuates/243359 "2020-07-31T13:20:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![techie\_2020](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/techie_2020/32/46158_2.png) [@techie\_2020](https://discuss.elastic.co/u/techie_2020)\
**Post date:** [July 31, 2020, 1:20pm UTC](https://discuss.elastic.co/t/time-taken-to-execute-query-fluctuates/243359/1 "2020-07-31T13:20:57Z")

</div>

I have this query  
GET \_search

> ```
> {
> "query": {
> "bool": {
> "must" : 
> [{"match" : {"track_id" : 4}}]
>           
> }
> }
> }
> 
> ```

However the time take fluctuates between 80 to even 300 or more.  
e.g

> {  
> "took" : 114,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 138,  
> "successful" : 138,  
> "skipped" : 0,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 0,  
> "max\_score" : null,  
> "hits" :   
> }  
> }

---

<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:** [August 3, 2020, 7:08am UTC](https://discuss.elastic.co/t/time-taken-to-execute-query-fluctuates/243359/2 "2020-08-03T07:08:30Z")

</div>

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

Which version of Elasticsearch are you using? What is the full output of the [cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster-stats.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:** [August 31, 2020, 7:08am UTC](https://discuss.elastic.co/t/time-taken-to-execute-query-fluctuates/243359/3 "2020-08-31T07:08:30Z")

</div>

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