Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database/sql: Export statistics about opened and closed prepared statements #46317

Open
yabberyabber opened this issue May 22, 2021 · 1 comment
Open
Labels
FeatureRequest NeedsInvestigation
Milestone

Comments

@yabberyabber
Copy link

@yabberyabber yabberyabber commented May 22, 2021

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.

@dmitshur dmitshur added NeedsInvestigation FeatureRequest labels May 22, 2021
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented May 22, 2021

CC @bradfitz, @kardianos, @kevinburke via owners.

@dmitshur dmitshur added this to the Backlog milestone May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

2 participants