# How to paging with elasticsearch sql

**URL:** <https://discuss.elastic.co/t/how-to-paging-with-elasticsearch-sql/364433>\
**Category:** Elasticsearch\
**Created:** [August 6, 2024, 6:11am UTC](https://discuss.elastic.co/t/how-to-paging-with-elasticsearch-sql/364433 "2024-08-06T06:11:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmy0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimmy0/32/136361_2.png) [@jimmy0](https://discuss.elastic.co/u/jimmy0)\
**Post date:** [August 6, 2024, 6:11am UTC](https://discuss.elastic.co/t/how-to-paging-with-elasticsearch-sql/364433/1 "2024-08-06T06:11:38Z")

</div>

The document offers "limit", but without "offset".

> **[SELECT | Elasticsearch Guide \[7.13\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/sql-syntax-select.html)**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/e/4e872837ce213a635b304d4a6a1b988f0ec8b753.png)

I'm using elasticsearch 7.10.1.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 6, 2024, 2:45pm UTC](https://discuss.elastic.co/t/how-to-paging-with-elasticsearch-sql/364433/2 "2024-08-06T14:45:17Z")

</div>

Yes that's true. And even in 8.14 which you should definitely upgrade to: [SELECT | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-syntax-select.html)

I know that something along those lines will be implemented in `ES|QL`.

> <https://github.com/elastic/elasticsearch/issues/100000>
>
> \### Description
> 
> Currently ESQL returns all results in one page. This doesn't wo…rk in cases where a lot of data needs to be returned (such as streaming from the storage) or where the clients needs to consume the response in small pages.
> Similar to search\_after/scroll API, ESQL endpoint should be able to 'stream' the results back to the client through a pagination mechanism.

But I don't know if this will happen in the SQL feature.

> [@jimmy0](#):
>
> I'm using elasticsearch 7.10.1.

Please upgrade to at least 7.17.23.  
Your version is missing a lot of patches including security patches.

---

<div class="post-metadata">

**Author:** ![jimmy0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimmy0/32/136361_2.png) [@jimmy0](https://discuss.elastic.co/u/jimmy0)\
**Post date:** [September 11, 2024, 6:55am UTC](https://discuss.elastic.co/t/how-to-paging-with-elasticsearch-sql/364433/3 "2024-09-11T06:55:39Z")

</div>

Thanks.
