# Elasticsearch aggregation performance on long vs float/scaled\_float/double

**URL:** <https://discuss.elastic.co/t/elasticsearch-aggregation-performance-on-long-vs-float-scaled-float-double/206262>\
**Category:** Elasticsearch\
**Created:** [November 3, 2019, 1:16am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-performance-on-long-vs-float-scaled-float-double/206262 "2019-11-03T01:16:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin\_Art](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevin_art/32/54479_2.png) [@kevin\_Art](https://discuss.elastic.co/u/kevin_Art)\
**Post date:** [November 3, 2019, 1:16am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-performance-on-long-vs-float-scaled-float-double/206262/1 "2019-11-03T01:16:58Z")

</div>

i'm just wondering if there's someone here who have tried to check if there's a performance difference between using long and float/scaled\_float in elasticsearch specially when using sum aggregation?

for the long, the number will be multiplied first by 100 before storing it in elasticsearch.

we are not trying to solve the precision error on float but rather we are trying to check if there will be a performance improvement when aggregating if we use long instead of float/double

Thank you

---

<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:** [December 1, 2019, 1:17am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-performance-on-long-vs-float-scaled-float-double/206262/2 "2019-12-01T01:17:02Z")

</div>

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