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

Enable dbstat table by default #580

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Conversation

pawurb
Copy link
Contributor

@pawurb pawurb commented Nov 18, 2024

Hi. Similar to TryGhost/node-sqlite3#1279 . This PR enables dbstat table, that contains useful info like size of tables, indexes, etc. useful for debugging.

@flavorjones
Copy link
Member

flavorjones commented Nov 18, 2024

Nice! Thank you for opening this.

Documentation on DBSTAT is here: https://sqlite.org/dbstat.html

Related to #573 which documents Debian has this flag set already.

@pawurb Can you please add a small test like the one in https://github.com/sparklemotion/sqlite3-ruby/pull/578/files to exercise the virtual table and prevent regression? The test may fail on some platforms, in which case I'll need the same sort of metadata mentioned in that PR ("is this using the vendored sqlite or a system sqlite?") to conditionally run the test (and I will add that if needed).

@flavorjones flavorjones changed the title [#573] Enable dbstat table by default Enable dbstat table by default Nov 18, 2024
@flavorjones
Copy link
Member

Rebased and added a commit to skip the test when using system libraries (specifically, if the user links against sqlcipher or mswin/mingw sqlite -- see https://github.com/sparklemotion/sqlite3-ruby/actions/runs/11910233460 for the failing tests).

@flavorjones flavorjones enabled auto-merge (squash) November 19, 2024 22:35
@flavorjones flavorjones merged commit 1d4cc9e into sparklemotion:main Nov 19, 2024
105 checks passed
@pawurb
Copy link
Contributor Author

pawurb commented Nov 20, 2024

thanks for a quick merge! I've started building https://github.com/pawurb/rails-sqlite-extras so it will help a lot

@pawurb pawurb deleted the enable_dbstat branch November 20, 2024 08:31
@flavorjones
Copy link
Member

😍 that project looks neat! Hoping to ship a release of this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants