I am going to add another answer here because I was very puzzled by this behavior and it took me a long time to find the answer in the comments of @AaronM
This applies to ES 1.7.2 using the java API.
I scrolled / looked at the index of 500 m records, but with a query that returns about 400 thousand rows.
I started with a scroll size of 1000, which seemed like a reasonable compromise in terms of network and processor.
This query was executed terribly slowly, taking about 30 minutes to complete, with very long pauses between cursor samples.
I was worried that maybe this was just the request that I was executing, and I didnβt believe that reducing the scroll size might help, as 1000 seemed tiny.
However, after seeing the AaronM comment above, I tried a scroll size of 10.
All work was completed after 30 seconds (and it was whether I restarted ES or not, so, presumably, nothing to do with caching) - the acceleration is about 60x !!!
So, if you have performance issues with scrolling / scanning, I highly recommend reducing the scroll size. I could not find much about it on the Internet, so I posted it here.
source share