# Response is terribly slow, when using from/size for pagination for large 'from' values

**URL:** <https://discuss.elastic.co/t/response-is-terribly-slow-when-using-from-size-for-pagination-for-large-from-values/132659>\
**Category:** Elasticsearch\
**Created:** [May 21, 2018, 12:59pm UTC](https://discuss.elastic.co/t/response-is-terribly-slow-when-using-from-size-for-pagination-for-large-from-values/132659 "2018-05-21T12:59:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WeerasEs](https://avatars.discourse-cdn.com/v4/letter/w/f6c823/32.png) [@WeerasEs](https://discuss.elastic.co/u/WeerasEs)\
**Post date:** [May 21, 2018, 12:59pm UTC](https://discuss.elastic.co/t/response-is-terribly-slow-when-using-from-size-for-pagination-for-large-from-values/132659/1 "2018-05-21T12:59:53Z")

</div>

The corresponding query nearly returns 3 million documents.

From : 1, size : 50 =\> Response comes within 2 seconds.  
From : 1,000,000, size : 50 =\> Response comes after 20 seconds.

If we send multiple concurrent requests for the second instance, Elasticsearch instance hangs up. What are the possible approaches we can take in this scenario?

Thanks

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [May 21, 2018, 3:30pm UTC](https://discuss.elastic.co/t/response-is-terribly-slow-when-using-from-size-for-pagination-for-large-from-values/132659/2 "2018-05-21T15:30:24Z")

</div>

First paragraph of this doc is relevant: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.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:** [June 18, 2018, 3:30pm UTC](https://discuss.elastic.co/t/response-is-terribly-slow-when-using-from-size-for-pagination-for-large-from-values/132659/3 "2018-06-18T15:30:36Z")

</div>

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