# What about the Scroll API makes it a bad choice for paging large result sets?

**URL:** <https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704>\
**Category:** Elasticsearch\
**Created:** [October 11, 2024, 9:30pm UTC](https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704 "2024-10-11T21:30:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweller](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sweller](https://discuss.elastic.co/u/sweller)\
**Post date:** [October 11, 2024, 9:30pm UTC](https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704/1 "2024-10-11T21:30:32Z")

</div>

The fact that the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/scroll-api.html) is not recommended for deep pagination in ES 8 is well-documented. I'm currently updating some legacy code which uses it to page through a result set much larger than 10k hits, and from what I've read so far, it seems like search\_after + PIT mainly exists to support realtime operations/lower request overhead.

My code is a long running job which I have the luxury of shutting down traffic to the cluster for whenever it needs to run. With that in mind, is there any danger in continuing to use scroll this way until I have time to go back and replace with search\_after + PIT, or are there other issues with this that I am not considering?

---

<div class="post-metadata">

**Author:** ![nfeekery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nfeekery/32/117349_2.png) [@nfeekery](https://discuss.elastic.co/u/nfeekery)\
**Post date:** [October 15, 2024, 3:07pm UTC](https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704/2 "2024-10-15T15:07:29Z")

</div>

From #Elastic Search to #Elasticsearch

---

<div class="post-metadata">

**Author:** ![sweller](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sweller](https://discuss.elastic.co/u/sweller)\
**Post date:** [October 25, 2024, 7:04pm UTC](https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704/3 "2024-10-25T19:04:15Z")

</div>

Bump. Would really like a straightforward answer on the pros and cons of this approach. Fully acknowledge it might be dumb, but I would like someone to explain why further than, "You just shouldnt do it"

---

<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:** [November 22, 2024, 7:04pm UTC](https://discuss.elastic.co/t/what-about-the-scroll-api-makes-it-a-bad-choice-for-paging-large-result-sets/368704/4 "2024-11-22T19:04:35Z")

</div>

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