Title: sqlite: expose prepared statement stats · Issue #64540 · nodejs/node · GitHub
Open Graph Title: sqlite: expose prepared statement stats · Issue #64540 · nodejs/node
X Title: sqlite: expose prepared statement stats · Issue #64540 · nodejs/node
Description: What is the problem this feature will solve? Sqlite's prepared statements collect various statistics about their behavior; see the full list here. It would be nice to expose them. Most notably, as discussed here, you can check whether a ...
Open Graph Description: What is the problem this feature will solve? Sqlite's prepared statements collect various statistics about their behavior; see the full list here. It would be nice to expose them. Most notably, as ...
X Description: What is the problem this feature will solve? Sqlite's prepared statements collect various statistics about their behavior; see the full list here. It would be nice to expose them. Most notably,...
Opengraph URL: https://github.com/nodejs/node/issues/64540
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: expose prepared statement stats","articleBody":"### What is the problem this feature will solve?\n\nSqlite's prepared statements [collect various statistics about their behavior](https://sqlite.org/c3ref/stmt_status.html); see [the full list here](https://sqlite.org/c3ref/c_stmtstatus_counter.html). It would be nice to expose them.\n\nMost notably, as discussed [here](https://tenderlovemaking.com/2026/07/15/detecting-full-table-scans-with-sqlite/), you can check whether a statement has performed a full table scan. Asserting that a statement does not perform a full scan is a very useful check to prevent degenerate performance.\n\n### What is the feature you are proposing to solve the problem?\n\nAdd one or more methods or getters on [StatementSync](https://nodejs.org/api/sqlite.html#class-statementsync) exposing this information.\n\nThis could be:\n- a single method where you pass the name of the counter you're interested in and get a number back\n- a single method with no parameters which returns all the counters as an object\n- a method for each counter\n- a getter for each counter\n\nMy inclination would be getters, but I'm ok with any of these options.\n\nOptionally, we could also expose methods to reset the counters. That seems less important but it's a feature in the underlying API.\n\n### What alternatives have you considered?\n\nI don't think there is any way to do this currently. `sqlite3_stmt_status` isn't exposed to userland by any mechanism I can find.","author":{"url":"https://github.com/bakkot","@type":"Person","name":"bakkot"},"datePublished":"2026-07-16T17:45:04Z","url":"https://github.com/nodejs/node/issues/64540"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:79e935b3-1ada-dd64-0e5a-3c0ecb1ee4d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E136:F5278:A1FEDF:D6780B:6AED30BE |
| html-safe-nonce | 48d58c64cf6afe9b829ebfe691f14e6b9dd7b8d518502366bdbbe57d78d10899 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTM2OkY1Mjc4OkExRkVERjpENjc4MEI6NkFFRDMwQkUiLCJ2aXNpdG9yX2lkIjoiMTU3MzMxMDA2MjA2NDkwNjQzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 149ec7ffe59534fe61d4ad14352553bb6c758e7f2d35b52fa8ce4571291c4168 |
| hovercard-subject-tag | issue:4904589459 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64540/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4e23d2814e48706173e857df674d314dfb2b95d8a48732b31ce770e9296fee1/nodejs/node/issues/64540 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4e23d2814e48706173e857df674d314dfb2b95d8a48732b31ce770e9296fee1/nodejs/node/issues/64540 |
| og:image:alt | What is the problem this feature will solve? Sqlite's prepared statements collect various statistics about their behavior; see the full list here. It would be nice to expose them. Most notably, as ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bakkot |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width