# How to find the average query response time

**URL:** https://discuss.elastic.co/t/how-to-find-the-average-query-response-time/39758
**Category:** Elasticsearch
**Created:** [January 21, 2016, 10:52am UTC](https://discuss.elastic.co/t/how-to-find-the-average-query-response-time/39758 "2016-01-21T10:52:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)
#### Post date: [January 21, 2016, 10:52am UTC](https://discuss.elastic.co/t/how-to-find-the-average-query-response-time/39758/1 "2016-01-21T10:52:44Z")

</div>

Hi,

I want to find out the average query response time. Say I ran a thousand queries, does ES provide any stats API to find the average response time of all the queries.

Using

\_node/stats API, I see I can get stats like below, but is that average response time if I do a calculation of query\_time\_in\_millis/query\_total? Can you please explain what's the difference between query and fetch stats that we get for search stats(as shown below)

search: {  
open\_contexts: 0,  
query\_total: 128150,  
query\_time\_in\_millis: 19653,  
query\_current: 0,  
fetch\_total: 127903,  
fetch\_time\_in\_millis: 8173,  
fetch\_current: 0  
}

---

<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 5, 2017, 11:22pm UTC](https://discuss.elastic.co/t/how-to-find-the-average-query-response-time/39758/2 "2017-07-05T23:22:34Z")

</div>


