# Calculate avg query and fetch time

**URL:** https://discuss.elastic.co/t/calculate-avg-query-and-fetch-time/14570
**Category:** Elasticsearch
**Created:** [November 25, 2013, 9:27am UTC](https://discuss.elastic.co/t/calculate-avg-query-and-fetch-time/14570 "2013-11-25T09:27:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Muzammil\_Rehman](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Muzammil\_Rehman](https://discuss.elastic.co/u/Muzammil_Rehman)
#### Post date: [November 25, 2013, 9:27am UTC](https://discuss.elastic.co/t/calculate-avg-query-and-fetch-time/14570/1 "2013-11-25T09:27:08Z")

</div>

Hey

I would like to calculate the avg query and fetch time on my elasticsearch  
server. I have tried to get it from [http://localhost:9200/\_stats](http://localhost:9200/_stats)  
[http://pastebin.com/rnevMFRX](http://pastebin.com/rnevMFRX) but i am confused as the query\_time and  
fetch\_time keep increasing on every search i make on kibana UI. I am trying  
to build a graph of this stats to be presented to my management.

Any help will be greatly appreciated.

Thanks in advance

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Muzammil\_Rehman](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Muzammil\_Rehman](https://discuss.elastic.co/u/Muzammil_Rehman)
#### Post date: [November 25, 2013, 9:33am UTC](https://discuss.elastic.co/t/calculate-avg-query-and-fetch-time/14570/2 "2013-11-25T09:33:16Z")

</div>

it just hit me....

query\_time\_in\_millis/query\_total \<== will this give me avg query time ?  
same thing for fetch ..

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:05am UTC](https://discuss.elastic.co/t/calculate-avg-query-and-fetch-time/14570/3 "2017-07-06T02:05:03Z")

</div>


