...

/

Fetch Large Datasets With Streams

Fetch Large Datasets With Streams

Learn how to fetch large datasets with streams.

What are streams

Streams are a core part of Elixir. We use streams for:

  • Lazy processing
  • To avoid loading lots of data into memory at once
  • For processing infinite data streams.

Many of Elixir’s concurrency constructs build on top of streams, such as the Task.async_stream function and the GenStage and Flow packages.

It’s essential to try to utilize concurrency when working with databases because much of the time spent during query ...