# Document size effect on aggregations

**URL:** <https://discuss.elastic.co/t/document-size-effect-on-aggregations/82660>\
**Category:** Elasticsearch\
**Created:** [April 18, 2017, 7:24am UTC](https://discuss.elastic.co/t/document-size-effect-on-aggregations/82660 "2017-04-18T07:24:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaharmor](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shaharmor](https://discuss.elastic.co/u/shaharmor)\
**Post date:** [April 18, 2017, 7:24am UTC](https://discuss.elastic.co/t/document-size-effect-on-aggregations/82660/1 "2017-04-18T07:24:33Z")

</div>

Hi,

I am wondering how much does the document size itself affect the query & aggregation performance.

Lets say I have documents that look like this:

```auto
{
  datetime: '2017-04-18T07:00:00.000Z',
  value: 10
}

```

and I have 10 million of them, and the query & aggregation time is X.

What if the documents would look like this:

```auto
{
  datetime: '2017-04-18T07:00:00.000Z',
  value: 10,
  somefield: 9999999.51,
  anothetfield: 'tons of unneeded information that is not related to the aggregation',
  anothetfield2: 'tons of unneeded information that is not related to the aggregation',
 anothetfield3: 'tons of unneeded information that is not related to the aggregation',
 ...
}

```

How will the performance be different? does it have any affect at all? (I'm only worried about query & aggregation performance, not indexing (Which is obvious that will take more time))

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [April 21, 2017, 8:01am UTC](https://discuss.elastic.co/t/document-size-effect-on-aggregations/82660/2 "2017-04-21T08:01:42Z")

</div>

if you query the same fields it won't really matter much. When you load the documents from disk to display them we obviously need to load more into memory from disk that will affect perf but since we do that only for the top N it won't make much of a difference.

hope that helps.

---

<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:** [May 19, 2017, 8:05am UTC](https://discuss.elastic.co/t/document-size-effect-on-aggregations/82660/3 "2017-05-19T08:05:46Z")

</div>

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