# Which is better between Scroll and Search\_After when extract lots of document to other database?

**URL:** <https://discuss.elastic.co/t/which-is-better-between-scroll-and-search-after-when-extract-lots-of-document-to-other-database/307349>\
**Category:** Elasticsearch\
**Created:** [June 16, 2022, 6:55am UTC](https://discuss.elastic.co/t/which-is-better-between-scroll-and-search-after-when-extract-lots-of-document-to-other-database/307349 "2022-06-16T06:55:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haocheng\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haocheng_wang/32/107102_2.png) [@Haocheng\_Wang](https://discuss.elastic.co/u/Haocheng_Wang)\
**Post date:** [June 16, 2022, 6:55am UTC](https://discuss.elastic.co/t/which-is-better-between-scroll-and-search-after-when-extract-lots-of-document-to-other-database/307349/1 "2022-06-16T06:55:19Z")

</div>

Hi community!

I note that since 7.0, scroll is **deprecated** in deep pagination from the [document](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results)

But the document also said : the scroll API can be used to retrieve large numbers of results (or even all results) from a single search request.

I have some confusions about this:

1. What's the difference between retrieve large numbers of results and deep pagination?
2. When hits is more than 10000, why search\_after can be more efficient when preserve state?
3. Can we use Search\_After API for retrieve large numbers of results?

---

<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:** [July 14, 2022, 6:55am UTC](https://discuss.elastic.co/t/which-is-better-between-scroll-and-search-after-when-extract-lots-of-document-to-other-database/307349/2 "2022-07-14T06:55:41Z")

</div>

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