database/sql: Export statistics about opened and closed prepared statements #46317
Labels
FeatureRequest
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Currently, the builtin database/sql package keeps track of the prepared statements that are open against the underlying database. However, there is no way for consumers to query this data in order to see how many statements are open/closed.
The proposal here is to add two fields to the DB.Stats type, and to have the sql package track the number of open
statements. Note that the number of open statements is distinct from the number of open connections.
I have proposed code-change here https://go-review.googlesource.com/c/go/+/322049 - naturally, the names of
these fields are changeable based on feedback.
The text was updated successfully, but these errors were encountered: