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
{{ message }}
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Compile with SQLITE_ENABLE_DBSTAT_VTAB to enable DBSTAT table support? #1279
Per https://www.sqlite.org/dbstat.html , the DBSTAT table is only available if when sqlite is compiled with the SQLITE_ENABLE_DBSTAT_VTAB flag. Any reason not to do this?
Asking because the DBSTAT table is particularly helpful when analyzing db storage usage.
Interesting question, I don't think this has come up before.
I would assume enabling this would come with a minor performance impact, but I have not measured it or found anyone with an analysis. We would have to run a benchmark against a version with it enabled and one without it.
Quick followup: After looking into this, we've decided that compiling our own version of this is not worth the complexity and time it adds to our build pipeline.
@kewde While I don't know what perf impact this would have, the precompiled binariesand Homebrew both have this option enabled. That seems to suggest it's not a serious concern. So... enable it here for the sake of consistency?
Activity
kewde commentedon Feb 9, 2020
Hi @broofa,
Interesting question, I don't think this has come up before.
I would assume enabling this would come with a minor performance impact, but I have not measured it or found anyone with an analysis. We would have to run a benchmark against a version with it enabled and one without it.
Enabling DBSTAT is something that you can do yourself if you build from source.
Add SQLITE_ENABLE_DBSTAT_VTAB=1 to the defines below:
https://github.com/mapbox/node-sqlite3/blob/master/deps/sqlite3.gyp#L84
https://github.com/mapbox/node-sqlite3/blob/master/deps/sqlite3.gyp#L97
Clone this repository, make the changes above and then run
npm install --build-from-sourcebroofa commentedon Feb 9, 2020
Thanks for the quick reply. I'll try compiling with those flags and see how it goes..
broofa commentedon Feb 12, 2020
Quick followup: After looking into this, we've decided that compiling our own version of this is not worth the complexity and time it adds to our build pipeline.
@kewde While I don't know what perf impact this would have, the precompiled binariesand Homebrew both have this option enabled. That seems to suggest it's not a serious concern. So... enable it here for the sake of consistency?
kewde commentedon Apr 27, 2020
@broofa fixed in v4.2.0