# Aggregation execution time

**URL:** <https://discuss.elastic.co/t/aggregation-execution-time/48017>\
**Category:** Elasticsearch\
**Created:** [April 21, 2016, 9:53am UTC](https://discuss.elastic.co/t/aggregation-execution-time/48017 "2016-04-21T09:53:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JLVeiga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jlveiga/32/55259_2.png) [@JLVeiga](https://discuss.elastic.co/u/JLVeiga)\
**Post date:** [April 21, 2016, 9:53am UTC](https://discuss.elastic.co/t/aggregation-execution-time/48017/1 "2016-04-21T09:53:18Z")

</div>

When we have a query with aggs, the took field returned in search API represents the execution time of all the search, query and agg? Or only the query execution time and the agg time isn't included there.

Thanks

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [April 21, 2016, 10:59am UTC](https://discuss.elastic.co/t/aggregation-execution-time/48017/2 "2016-04-21T10:59:13Z")

</div>

The took time represents the time taken to execute the entire request (except for serialising the response to JSON)

---

<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, 10:57pm UTC](https://discuss.elastic.co/t/aggregation-execution-time/48017/3 "2017-07-05T22:57:22Z")

</div>


