Closed
Description
If any arguments are passed to Query, lib/pq appears to prepare the statement under the hood. In some workloads, this creates a constant workload of parse, bind, select, parse, bind, select, parse, bind, select, etc on the server if all queries are just one-shot.
It seems like it would be better to only prepare the statement when calling DB.Prepare and use the Stmt interface to issue the query. This way, a developer can avoid the round-trip overhead of prepared statements when they know their workload does not benefit from it.
Metadata
Metadata
Assignees
Labels
No labels