Running pragma optimize on all connections
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
https://www.sqlite.org/lang_analyze.html recommends running
PRAGMA analysis_limit=400;
PRAGMA optimize;
on each DB Connection just before it closes.
However as https://github.com/mattn/go-sqlite3/issues/255 points out, there is no way to do access all connections at the moment.
It's important that this be run on every connection, since each connection stores data about which tables need to be analyzed base on queries it ran.
I wonder if we could expose some API to do this?
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the database/sql connection lifecycle and the SQLite PRAGMA analysis_limit and optimize documentation. Determine how the driver could expose access to every connection and define what should happen before each connection closes; the issue is done when that API is specified and covered by appropriate connection-lifecycle tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100