# Fetch 1M records using aggregation in a single call

**URL:** <https://discuss.elastic.co/t/fetch-1m-records-using-aggregation-in-a-single-call/289399>\
**Category:** Elasticsearch\
**Created:** [November 17, 2021, 7:27am UTC](https://discuss.elastic.co/t/fetch-1m-records-using-aggregation-in-a-single-call/289399 "2021-11-17T07:27:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreejith\_Ms](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sreejith_ms/32/42392_2.png) [@Sreejith\_Ms](https://discuss.elastic.co/u/Sreejith_Ms)\
**Post date:** [November 17, 2021, 7:27am UTC](https://discuss.elastic.co/t/fetch-1m-records-using-aggregation-in-a-single-call/289399/1 "2021-11-17T07:27:25Z")

</div>

We have to create some reports based on nearly 100M data and its requires aggregation and the result will be nearly 5M records.

So, Can I use Elasticsearch for this report generation and fetch up to 5M records in a single call?

Anyone, please help me out?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 22, 2021, 12:20am UTC](https://discuss.elastic.co/t/fetch-1m-records-using-aggregation-in-a-single-call/289399/2 "2021-11-22T00:20:57Z")

</div>

In a single call? No.

You need to use [Scroll API | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/scroll-api.html) or [Point in time API | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/point-in-time-api.html)

---

<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 20, 2021, 12:21am UTC](https://discuss.elastic.co/t/fetch-1m-records-using-aggregation-in-a-single-call/289399/3 "2021-12-20T00:21:01Z")

</div>

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