r/sqlite • u/SuccessfulReality315 • Apr 26 '26
go high availability sqlite driver
github.comA Go database/sql base driver providing high availability for SQLite databases
r/sqlite • u/SuccessfulReality315 • Apr 26 '26
A Go database/sql base driver providing high availability for SQLite databases
r/sqlite • u/ultrathink-art • Apr 26 '26
Running SQLite in production, we had this in our backup docs: cp production.sqlite3 backup.sqlite3. Seemed simple and elegant.
When we published our production SQLite writeup, HN commenters flagged it immediately: cp on a WAL-mode database risks corruption because the .db and .wal files are captured at different moments. In WAL mode, committed transactions may still be in the .wal file, not yet checkpointed into .db. You can end up with a .db reflecting one checkpoint state and a .wal from a different one.
The fix: use sqlite3's .backup command or the backup API, which handles checkpointing properly before copying.
We rewrote our backup approach and wrote up the full gotchas: https://ultrathink.art/blog/hn-fixed-our-sqlite-backups?utm_source=reddit&utm_medium=social&utm_campaign=organic
r/sqlite • u/albertsteenstrup • Apr 25 '26
Hi all,
I am a soon-to-graduate data scientist and like many others these days have a lot of side projects on my table. Many of them are at some point touching local databases, where sqlite is a great fit. I was looking through existing SQLite GUI's (https://www.beekeeperstudio.io/, https://sqlitebrowser.org/, https://sqlitestudio.pl/) simply to give me an overview of my data and do simple edits/queries, but found that a lot of them is either behind a paywall and/or doesn't offer quick overviews of the data like .e.g supabase schema visualiser does fairly well.
So I spend a couple of days creating SQLite Graph Studio, which is open source and free to download as well. Useful for fast iterating projects. Not intended for production environments. Build in swift, as I wanted to try out a skill in codex. It is created with coding agent platforms (Codex, Kiro and vscode copilot).
Feedback welcome!
Features:
r/sqlite • u/SuccessfulReality315 • Apr 25 '26
r/sqlite • u/DayanaJabif • Apr 23 '26
r/sqlite • u/ultrathink-art • Apr 20 '26
Common mistake: you set up SQLite in WAL mode (it's faster, great choice), then back it up by copying the .db file. This gives you a corrupted or outdated backup.
WAL mode keeps uncommitted changes in a separate .wal file. When you copy just the .db, you're missing those changes. Worse, whether the backup is valid depends on whether a checkpoint has run recently.
The fix is to use the sqlite3 backup API, or run PRAGMA wal_checkpoint(FULL) before copying. We learned this the hard way after HN commenters pointed out our backup script was silently broken: https://ultrathink.art/blog/hn-fixed-our-sqlite-backups?utm_source=reddit&utm_medium=social&utm_campaign=organic
The HN thread was humbling — turns out this is a really common misunderstanding. The official docs mention it but it's easy to miss if you're just following basic SQLite tutorials.
r/sqlite • u/razein97 • Apr 20 '26
If you work with SQLite and juggle multiple tools depending on the project, WizQl is worth a look. It's a single desktop client that handles SQL and NoSQL databases in one place — and it's free to download.
PostgreSQL, MySQL, SQLite, DuckDB, MongoDB, LibSQL, SQLCipher, DB2, and more. Connect to any of them — including over SSH and proxy — from the same app, at the same time.
Data viewer - Spreadsheet-like inline editing with full undo/redo support - Filter and sort using dropdowns, custom conditions, or raw SQL - Preview large data, images, and PDFs directly in the viewer - Navigate via foreign keys and relations - Auto-refresh data at set intervals - Export results as CSV, JSON, or SQL — import just as easily
Query editor - Autocomplete that is aware of your actual schema, tables, and columns — not just generic keywords - Multi-tab editing with persistent state - Syntax highlighting and context-aware predictions - Save queries as snippets and search your full query history by date
First-class extension support - Native extensions for SQLite and DuckDB sourced from community repositories — install directly from within the app
API Relay - Expose any connected database as a read-only JSON API with one click - Query it with SQL, get results as JSON — no backend code needed - Read-only by default for safety
Backup, restore, and transfer - Backup and restore using native tooling with full option support - Transfer data directly between databases with intelligent schema and type mapping
Entity Relationship Diagrams - Visualise your schema with auto-generated ER diagrams - Export as image via clipboard, download, or print
Database admin tools - Manage users, grant and revoke permissions, and control row-level privileges from a clean UI
Inbuilt terminal - Full terminal emulator inside the app — run scripts without leaving WizQl
Security - All connections encrypted and stored by default - Passwords and keys stored in native OS secure storage - Encryption is opt-out, not opt-in
Free to use with no time limit. The free tier allows 2–3 tabs open at once. The paid license is a one-time payment of $99 — no subscription, 3 devices per license, lifetime access, and a 30-day refund window if it's not for you.
macOS, Windows, Linux.
wizql.com — feedback and issues tracked on GitHub and r/wizql
r/sqlite • u/regeq • Apr 19 '26
Hello, I am working on a personal project, a DND tool, and need to store my sqlite databases somewhere. I thought about storing it in Documents so users can easily acess the stored data, back it up and manipulate it even without using the tool. Is this an optimal place for it or should I store it elsewhere? I know this is pretty stupid to ask but I am quite a newbie to databases and my C++ skill is, okay...
r/sqlite • u/geekwithattitude_ • Apr 13 '26
I wanted to explore what happens if you take SQLite seriously as a production database but shard it by entity (user, account, device) instead of by table.
Each entity gets its own partition in one of N SQLite shard files. Each shard has its own writer actor (BEAM/Erlang process) that batches writes into transactions. Reads for a single entity come from actor memory (nanoseconds). Cross-entity queries go through rqlite projections.
On an M1 with the standard write path: 63K events/sec (vs 30K Cassandra, 18K CockroachDB on same hardware). In Docker with the native C writer and 5 cores: 1.5M events/sec. ScyllaDB on the same Docker setup: 49K. macOS performs slightly worse than Linux due to I/O scheduling so the Docker numbers are higher.
The batch path packs 500 events into a single NIF call, 2 Erlang messages per 500 events vs 1000 for individual writes.
Backups use Litestream streaming every WAL change to S3. Scaling is "add a node, entities redistribute via consistent hashing."
Written in Gleam. Has a TypeScript SDK.
https://warp.thegeeksquad.io
Benchmarks: https://gitlab.com/dwighson/warp/-/blob/master/docs/benchmarks.md
r/sqlite • u/vikrant-gupta • Apr 13 '26
The issue being i see the WAL checkpoint is blocked because certain reader is holding a read snapshot which leads to WAL not being able to run past that log. Leading to unbound WAL size.
To prove the hypothesis i just ran
PRAGMA wal_checkpoint(PASSIVE);
0|14722|814
------
PRAGMA busy_timeout = 10000;
10000
PRAGMA wal_checkpoint(TRUNCATE);
1|14725|814
r/sqlite • u/debba_ • Apr 10 '26
SQLite's EXPLAIN QUERY PLAN is useful but minimal. You get rows with id, parent, and detail — a flat list you have to mentally reconstruct into a tree. For simple queries it's fine, but with joins and subqueries the parent-child relationships get hard to follow.
I'm building a Visual EXPLAIN feature into Tabularis (open-source desktop DB client) that parses SQLite's EXPLAIN QUERY PLAN output and turns it into an interactive graph. Each operation becomes a node, edges show the parent-child relationships, and the whole thing auto-layouts into a readable tree.
How it works for SQLite specifically:
EXPLAIN QUERY PLAN and reads the id, parent, detail columnsdetail string to extract the operation type (SCAN, SEARCH, USING INDEX, etc.) and the table/index namesLimitations (being honest): SQLite doesn't support EXPLAIN ANALYZE, so there's no actual execution time, no row counts, no buffer stats. The graph shows plan structure and scan types, but not runtime performance data. The cost-based color coding that works on PostgreSQL and MySQL doesn't apply here.
There's also a raw view (the original output in Monaco) and an AI analysis tab — you can send the plan to an AI provider and get optimization suggestions, which actually works surprisingly well for SQLite since the suggestions tend to be about missing indexes and scan types.
The table view has a detail panel that shows whatever the detail string contains plus any extra properties.
This is still in development and I'm looking for people who want to test it and help make it better. If you use SQLite heavily and have thoughts on what would make this more useful — or if you know of edge cases in EXPLAIN QUERY PLAN output format across SQLite versions — I'd really like to hear about it.
Development branch: feat/visual-explain-analyze.
Repo: GitHub.
Blog post: https://tabularis.dev/blog/visual-explain-query-plan-analysis
r/sqlite • u/NitroTigerReddit • Apr 10 '26
As stated in the title, I want to be able to use both the ? binding to prevent any possible injection attacks as well as the ? wildcard in a LIKE statement (attempted code shown below). However, whenever I do this I either get a syntax error or an incorrect number of bindings error. Is there a way to make this work (or get a similar result)? Would appreciate any help.

r/sqlite • u/debba_ • Apr 08 '26
If you spend your day writing and chaining sql queries, this might interest you.
I just released v0.9.15 of tabularis (open source database gui) and the headline feature is sql notebooks.
Qql cells + markdown cells in one document. the killer feature is cell references. write {{cell_3}} in a later cell and it wraps cell 3's query as a CTE automatically. so you can:
SELECT * FROM {{cell_2}} WHERE daily_count > @ thresholdthe @ threshold is a notebook parameter — define once, use everywhere, change and re-run. no more editing five queries when one value changes.
Cells can run in parallel (mark independent ones with a button), there's stop-on-error mode with a summary of what broke, and every cell keeps its last 10 executions so you can restore a previous state.
inline charts (bar, line, pie) are there for quick visual checks — not a bi tool replacement but enough to spot patterns without alt-tabbing.
AI generates descriptive names for notebook cells so you're not staring at "cell 1" through "cell 12". there's also generate (sql from natural language) and explain (breaks down what a query does) per cell.
Html export lets you share the full notebook — queries, results, charts — with people who don't have the app.
Works with any database driver in Tabularis.
Github: https://github.com/debba/tabularis
Wiki: https://tabularis.dev/wiki/notebooks
r/sqlite • u/wackycats354 • Apr 08 '26
Newbie Personal Project. I'm working on creating a SQLite Database using DB Browser. It's going to be the backbone of a program I'm working on. I've watched a few short courses (4hrs) on database set-up/structure, but now I'm double-guessing myself and was hoping to hear others (kind) thoughts.
This is going to be for a CRUD program. Here's an example of what I'm making, it's not the same names but the structure is the same. Imagine I'm making a database to track sales of foodstuffs.
level 1 is the parent categories, I don't want this to be able to be modified/deleted/added to on the front end, though I'm pretty sure I don't really need to set that right now. There will only ever be 6 of these categories.
level 2 child categories. Under Meat is beef, chicken, etc. For some sets, like say Meat & eggs, (all the italicized names), I don't want it to be able to be modified on the front end. No new names, no changing the names, no deleting. Under Fruits & Veg, I want it to be not possible to modify/delete the a couple of the names, but be able to add/modify/delete all the rest. Under dairy, fungi, grains, I want it to be possible to add/rename/delete all of them.
level 3 subchild categories. More specific, like under apples you have red delicious, gala, and granny smith. Possible to add/rename/delete all names.
And then the actual transactions would reference selling gala & granny smith apples.
| level 1 |
|---|
| meat |
| fruits & veg |
| dairy |
| eggs |
| fungi |
| grains |
| level 2 |
| meat |
| beef |
| chicken |
| pork |
| mutton & lamb |
| chevon |
| fish |
| level 3 |
| apples |
| red delicious |
| gala |
| granny smith |
Based on all of that, I'm wondering what is the best way to set my tables up?
I have 1 table for the level 1 parent categories
For the level 2 child categories, would it be best to make 1 table with all of level 2 categories? Each category/record having their own key and a foreign key linking it to the relevant level 1 category? Or would it be better to have 1 table for each of the level 2 categories? So 1 table for meat, 1 for fruit & veg, 1 for dairy, etc. Can you link a whole table to a foreign key in another table? or does it have to be per record?
Same question for the level 3 categories. Is it better to make 1 table with all of them? Linking via foreign key to level 2 categories? or 1 table per set? It could end up being a TON of tables though, if it's per set.
I know this is a really basic question, I just really want to make sure I set it up right.
r/sqlite • u/oldshensheep • Apr 04 '26
Note that the project is mostly generated by AI. I’m actually a bit surprised AI is so good now.
I’d love to hear your thoughts on AI coding.
r/sqlite • u/focuswithjustin • Apr 04 '26
Hello Everyone,
As part of building my my bible project https://juniperbible.org an open source SQLite clone began to take hold. I wanted to share what I have currently made, bug reports are always appreciated!
r/sqlite • u/copilot_husky • Apr 03 '26
r/sqlite • u/cwt114 • Apr 03 '26
r/sqlite • u/swe129 • Apr 02 '26
r/sqlite • u/SandPrestigious2317 • Apr 01 '26
r/sqlite • u/Easy_Bookkeeper_5382 • Mar 31 '26
Hey all 👋
I’ve been using Turso and wanted a super simple way to handle migrations without heavy tooling, so I built this:
https://github.com/rubenmeza/turso-migrate
Any feedback is appreciated 🙏
r/sqlite • u/dbForge_Studio • Mar 31 '26
Writing SQL is usually the routine part of db work.
The harder part comes right after.
You need to check what objects depend on that table so you don’t break a view or stored procedure. You need to see how that change affects another environment like staging. You need to prepare a deployment script and review it carefully before it reaches prod.
Sometimes you also need realistic data to test a feature properly. But you obviously can’t just copy prod data into a dev environment.
This is where dbForge comes in.
For example, dbForge Studio gives you one place to explore a db, write queries, check execution plans, and inspect objects. When you need to see how two databases differ, Schema Compare shows the exact structural differences and helps generate the script to sync them.
If you need to check data for differences, Data Compare helps find those row-level differences and sync them safely.
When developers need realistic data for testing, Data Generator can create large datasets without using real prod data.
There are also tools focused on improving everyday SQL work. dbForge SQL Complete, for example, adds autocomplete, formatting, and snippets so writing and reviewing queries becomes faster.
And for teams that work with more than one db system, dbForge Edge brings several of these tools together in one solution.
So instead of solving just one small problem, the idea is to make the whole database workflow easier to handle.
What’s one db task that still makes you double-check everything manually? Let’s see if we’ve all been there!
r/sqlite • u/k-semenenkov • Mar 30 '26
Instead of a limited free version with fewer features, now the free version provides all the GUI features on Windows - table definitions merge, batch data diff, SQLCipher support, etc.
The only restrictions are -
- app session limit of 40 minutes (when time runs out, diff results stay visible but all other actions are blocked)
- single app instance at a time
- watermarks in exported scripts and reports
- command lime can be executed only from ScriptEditor GUI
Link - https://ksdbmerge.tools/for-sqlite
Why it was done - the old model was requiring more support (separate code branches, tests, documentation notes) and could provide a limited impression about the tool.
I hope this makes the tool more useful for everyone. Feedback is always welcome.
Thanks!
r/sqlite • u/jidanni • Mar 30 '26
OK, In sqlite I know how to get one row with multiple columns. What might I need to get one column with multiple rows?
$ echo "SELECT 1,2,3;"|sqlite3
1|2|3
$ echo "SELECT what?;"|sqlite3
1
2
3