# Fetch 200M documents with slice and scroll

**URL:** <https://discuss.elastic.co/t/fetch-200m-documents-with-slice-and-scroll/119692>\
**Category:** Elasticsearch\
**Created:** [February 13, 2018, 6:51pm UTC](https://discuss.elastic.co/t/fetch-200m-documents-with-slice-and-scroll/119692 "2018-02-13T18:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshil](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@harshil](https://discuss.elastic.co/u/harshil)\
**Post date:** [February 13, 2018, 6:51pm UTC](https://discuss.elastic.co/t/fetch-200m-documents-with-slice-and-scroll/119692/1 "2018-02-13T18:51:11Z")

</div>

Hi, We have a requirement to fetch ~200M documents. To make this work in parallel, I am using slice and scroll API, and fetching 10,000 documents per page. I know scroll API will run a query and takes a snapshot of the matched documents and keep it alive till the TTL. I wanted to understand how slice works with scrolling? Let's say my query matches 25M documents, but I have given slice:{"id": 0, "max": 5} it will roughly split 25M in 5M/slice, will it keep the snapshot live of all 25M documents or the snapshot is just for that slice id(here slice\_id:0)?

---

<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:** [March 13, 2018, 6:51pm UTC](https://discuss.elastic.co/t/fetch-200m-documents-with-slice-and-scroll/119692/2 "2018-03-13T18:51:15Z")

</div>

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