persistent-postgresql-streaming: Memory-constant streaming of Persistent entities from PostgreSQL

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This library provides a set of APIs for performing queries on Persistent entities in constant memory, streaming the results using conduit.

The library relies on PostgreSQL-specific features to avoid loading all the results of a query into memory at once. This allows for accessing tables of millions of entities from Haskell without a memory blow-up.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), conduit (>=1.3 && <1.4), monad-logger (>=0.3.28.4 && <0.4), mtl (>=2 && <2.3), persistent (>=2.13.2 && <2.14), persistent-postgresql (>=2.13.2 && <2.14), postgresql-simple (>=0.6.1 && <0.7), resourcet (>=0.3 && <2), text (>=1 && <1.3), transformers (>=0.5 && <0.6) [details]
License BSD-3-Clause
Copyright (c) 2021 Supercede Ltd.
Author Isaac van Bakel
Maintainer support@supercede.com
Category Conduit, Database
Home page https://github.com/SupercedeTech/persistent-postgresql-streaming#readme
Source repo head: git clone https://github.com/SupercedeTech/persistent-postgresql-streaming
Uploaded by isaac_supercede at 2021-10-20T15:37:36Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for persistent-postgresql-streaming-0.1.0.0

[back to package description]

persistent-postgresql-streaming

This library allows for memory-constant streaming of persistent entities from PostgreSQL databases.

This code makes use of the PostgreSQL-only cursors, which allow for batched access to the result set of a query at speeds comparable to loading all the results into memory at once.

See the main project README for more.

Streaming Persistent queries

The main function of this library is selectStream, which can be used in place of selectSource. selectSource runs in a ConduitT - consuming the conduit will pull results from the database in constant memory.

FAQ

Why is selectStream so slow?

Have you configured PostgreSQL correctly? See the section in the README about it.