Skip to content
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

Allow caching query information #88

Closed
fishcakez opened this issue Dec 8, 2016 · 0 comments
Closed

Allow caching query information #88

fishcakez opened this issue Dec 8, 2016 · 0 comments

Comments

@fishcakez
Copy link

It's possible to prepare a query once, and execute the query on any process in the pool. This can save a round trip to the database. Please see https://github.com/fishcakez/postgrex_cache for an example - there should be a better API to handle this in the next release of postgrex. This will still work with pgbouncer etc if prepare: :unnamed is passed to Postgrex.start_link/child_spec but has limited benefit (encodes params before checking out connection) because the query will always be prepared and executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants