-
I want to used the new prepared statement functionality but I was wondering if SQLCommenter style comments containing trace information will break this cache. I'm guessing the answer is sadly yes, otherwise the query would have to be minimally parsed. |
Beta Was this translation helpful? Give feedback.
Answered by
JelteF
Apr 6, 2024
Replies: 1 comment 3 replies
-
If the comments are different, the prepared statement will be considered different. PgBouncer does not parse the query and thus does not remove the comments. So yes it sounds like that would break the cache. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why are you adding these comments to the queries in the first place? Seems like that's the problem here. Can you turn that off instead? Afaict even without pgbouncer in the middle that's going to problematic to get any perf benefit from prepared statements, because every statement will be new anyway.