-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
questionA community question, closed when inactive.A community question, closed when inactive.
Description
Gino seems to support prepared statements to some extent. As there is no documentation yet, could you please clarify how the prepared statements currently work.
What is the relationship between Gino prepared statements, Sqlalchemy and asyncpg? As far as I understand,
- Sqlalchemy does not support prepared statements
- Asyncpg supports prepared statements
But as per MagicStack/asyncpg#51 (comment)
- Asyncpg caches queries internally and discourages the use of prepared statements in most cases
- Prepared statements are per-connection
So,
- Does Gino utilize the LRU cache used internally by asyncpg? Does connection pooling affect this? Or is Gino simply unaware of any of the asyncpg internals regarding these?
- => should prepared statements generally be utilized for repeated queries?
- => what would be the way to approach repeated queries, e.g. we have an insert statement that is repeated thousands of times (with different values of course)
Thank you for your time!
Metadata
Metadata
Assignees
Labels
questionA community question, closed when inactive.A community question, closed when inactive.