# Aggregations without count

**URL:** <https://discuss.elastic.co/t/aggregations-without-count/58340>\
**Category:** Elasticsearch\
**Created:** [August 18, 2016, 11:45am UTC](https://discuss.elastic.co/t/aggregations-without-count/58340 "2016-08-18T11:45:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emrah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emrah/32/17657_2.png) [@Emrah](https://discuss.elastic.co/u/Emrah)\
**Post date:** [August 18, 2016, 11:45am UTC](https://discuss.elastic.co/t/aggregations-without-count/58340/1 "2016-08-18T11:45:02Z")

</div>

I just wonder that if i can exclude doc counts calculating when i get aggregations. Because at the moment i don't need doc counts. Does Elasticsearch make an extra effort to calculate doc counts on aggregation, or basically works like sql group by inside ?

---

<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:** [August 19, 2016, 8:15am UTC](https://discuss.elastic.co/t/aggregations-without-count/58340/2 "2016-08-19T08:15:58Z")

</div>

The doc count is very low cost to calculate since it is just maintaining and incrementing a single long for each bucket. The cost of maintaining and updating sub aggregations for each bucket will be much more than this so it shouldn't significantly impact the performance of your aggregation request.

---

<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:26pm UTC](https://discuss.elastic.co/t/aggregations-without-count/58340/3 "2017-07-05T22:26:44Z")

</div>


