-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streaming interface for queries? #41
Comments
The size of data loaded in memory may be 2-4 times bigger than in the database because of boxed representation in Haskell.
|
Yeah, but I'm surprised that the majority of heap objects are I've got no strong opinion about the API. At the end of the day I just need a |
I'm currently writing a RethinkDB backend and am particularly interested in this issue. Having a Streaming instance opens up change subscriptions in Rethink and tailable cursors in MongoDB (Although this would probably be another class I believe the Cursor only needs to be implemented in terms of two functions We could implement it in terms of a fold (which I think all sql-simple packages already have implemented). I don't think groundhog needs to be tied to any other iterator libraries. Although a clean implementation would leave open the possibility of a lightweight EDIT: |
I have just committed a streaming interface. It was written a while ago and was going to push it after writing at least either groundhog-pipes or groundhog-conduit. It has a bracket-like function interface that passes |
@lykahb What's the ETA for |
This looks like it should work! Thanks. When I finish up my RethinkDB backend I'll take a look at implement |
I've committed |
Currently, I use
select
as in e.g.to fetch up to about 20000 rows from a table. However, this seems to result in 60MiB of
ARR_WORDS
being allocated according to Heap profiling, which is far more than the underlying (Sqlite) database contains actual data.Is there a way to consume result values as soon as they get returned, rather than all at once? Maybe e.g. via a
fold
-like API?The text was updated successfully, but these errors were encountered: