Skip to content

Why not every query is a prepared statement by default? #2030

Discussion options

You must be logged in to vote

Drizzle won't handle anything implicitly for you, so you should always specify it yourself. There are cases when prepared statements are both beneficial and detrimental, depending on the environment and architecture you are using. It's generally advantageous with Drizzle as long as the query isn't built on every execution, but it may be disadvantageous (in some cases) at the database level.

For example, prepared statements on AWS RDS can exhaust your connection pooler. Additionally, prepared statements require some database memory to store cached queries, which may pose a problem for you (though not always)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AndriiSherman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants