Open
Description
It seems that Repo.stream
will not actually stream the query results. Instead the full resultset is returned and only then transformed into a stream.
For example the following code will give a timeout error:
def query do
import Ecto.Query
query = from r in Table, select: r
Repo.transaction fn ->
Repo.stream(query)
|> Stream.map(&IO.inspect/1)
|> Stream.run()
end
end
Running the same code against a Postgresql database will immediately start printing results as expected.