Document size effect on aggregations


(Shahar Mor) #1

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:

{
  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:

{
  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))


(Simon Willnauer) #2

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.


(system) #3

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