You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the postgres driver uses prepared statements to prevent sql injection. a new statement is created per query, and then cached for subsequent queries. this works as expected.
however, when you enable tracing it adds sql comments to your statements:
maybe cache misses are inevitable here because these are meant to be distinct queries sent the to the server. but i wonder if there's a way to put the comment on just the EXECUTE part and not the PREPARE
By the way let me know if you run into any other issues related to tracing, this is super relevant right now, and we will tackle them asap. A good chunk of important bugfixes might hopefully make it into the next release, and more are coming soon.
the postgres driver uses prepared statements to prevent sql injection. a new statement is created per query, and then cached for subsequent queries. this works as expected.
however, when you enable tracing it adds sql comments to your statements:
prisma-engines/query-engine/connectors/sql-query-connector/src/sql_trace.rs
Lines 34 to 37 in edd552c
wouldn't this mean the statement cache, which uses the raw sql text as the cache key, would no longer be effective?
prisma-engines/quaint/src/connector/postgres/native/mod.rs
Lines 322 to 323 in edd552c
prisma-engines/quaint/src/connector/postgres/native/mod.rs
Lines 85 to 86 in edd552c
cc @aqrln
The text was updated successfully, but these errors were encountered: