r/sqlite • • Aug 20 '25

Since SQLite can be faster than the file system for small files, has anyone made a SQLite based filesystem?

37 Upvotes

Is it possible to create a FUSE filesystem that is based on SQLite? Has anyone done this? Does it work well?


r/sqlite • • Jan 15 '25

SQLite 3.48.0 is released

37 Upvotes

Download page: https://www.sqlite.org/download.html

Changes: https://www.sqlite.org/releaselog/3_48_0.html

For those who don't follow the main SQLite forum, and heard from elsewhere that the build configuration mechanism has radically changed with consequent bugs, that only applies to building from the main sources. Most folks will be using the amalgamation tarballs, and that source still uses the same configure script as always, so no worries.


r/sqlite • • May 21 '23

pros and cons of DuckDb compared to SQLite?

37 Upvotes

What are the pros and cons of DuckDb compared to SQLite?


r/sqlite • • Jun 29 '26

SQLiteStudio renamed. New name: Letos.

36 Upvotes

Letos 4.0.0 released

Letos 4.0.0 is now available. This is the first major release under the new project name - Letos was formerly known as SQLiteStudio - and it is one of the largest releases in the history of the project.

Version 4.0.0 brings a new ERD editor, a move to Qt 6, native ARM64 builds, signed official packages, a refreshed high-DPI-ready interface, major improvements in data browsing and editing, and many smaller workflow improvements across the application.

Project renamed to Letos

SQLiteStudio is now Letos. Together with the new name, the project has moved to its new homepage: letos.org.

The goal remains the same: a free, open-source, cross-platform SQLite database manager focused on practical database work.

New ERD editor

The largest new feature in Letos 4.0.0 is the new ERD editor.

It allows viewing, creating and editing database schema visually as a diagram. Tables, columns and relations can be inspected and manipulated directly on the diagram, making schema design and schema analysis much more convenient than working only from dialogs or SQL text.


r/sqlite • • Jan 01 '26

GraphQLite - Graph database capabilities inside SQLite using Cypher

36 Upvotes

I've been working on a project I wanted to share. GraphQLite is an SQLite extension that brings graph database functionality to SQLite using the Cypher query language.

The idea came from wanting graph queries without the operational overhead of running Neo4j for smaller projects. Sometimes you just want to model relationships and traverse them without spinning up a separate database server. SQLite already gives you a single-file, zero-config database—GraphQLite adds Cypher's expressive pattern matching on top.

You can create nodes and relationships, run traversals, and execute graph algorithms like PageRank, community detection, and shortest paths. It handles graphs with hundreds of thousands of nodes comfortably, with sub-millisecond traversal times. There are bindings for Python and Rust, or you can use it directly from SQL.

It's MIT licensed and I'd genuinely appreciate any feedback or criticism.

GitHub: https://github.com/colliery-io/graphqlite


r/sqlite • • Sep 29 '25

Subtleties of SQLite Indexes

36 Upvotes

I'm the developer of Scour, a personalized content feed built using SQLite. The number of articles ingested per month has grown massively over the past 6 months and slowed down the main ranking query. After spending too many hours trying in vain to squeeze more performance out of my queries and indexes, I dug into how SQLite's query planner uses indexes, learned some of the subtleties that explained why my initial tweaks weren't working, and sped up one of my main queries by ~35%.

Here's the write-up: https://emschwartz.me/subtleties-of-sqlite-indexes/ Hope others find it interesting or useful!


r/sqlite • • Aug 08 '25

Remote ID vs Primary Key

36 Upvotes

I was talking with a buddy online and he told me that his old company used two different IDs for each row in their DB, the auto-incrementing ID was only ever used for internal purposes like JOIN statements and FKs into other tables. But anything and everything outside the DB used what he called a remote ID.

This remote ID was then what was used to query the DB, as well as on any user-facing code (user ID, message ID, transaction ID, whatever). And I was just curious if this is a standard practice or something that his company did.


r/sqlite • • Jun 04 '26

Turso CEO Glauber Costa is doing an AMA on rewriting SQLite in Rust and the future of databases

35 Upvotes

Glauber Costa, CEO and co-founder of Turso, is currently doing an AMA over on r/IAmA.

Glauber is a former Linux kernel contributor, helped build ScyllaDB, worked at Datadog, and is now leading Turso’s efforts around libSQL and the new Rust-based Turso Database, a clean-room reimplementation of SQLite.

Topics include:
• Rewriting SQLite in Rust
• Database architecture and distributed systems
• Linux kernel development
• Open source business models
• The future of SQLite and embedded databases

AMA link: https://www.reddit.com/r/IAmA/comments/1tvz2dm/comment/opkhk1i/?screen_view_count=2

Thought this community might find it interesting.


r/sqlite • • Jun 25 '24

What do y'all think of libSQL and Turso?

35 Upvotes

Hey folks,

I make Beekeeper Studio, which is a desktop SQL GUI. I just added support for libSQL in the latest release, mostly because it was so easy to work with and took only a day or two to do the work.

Curious, what does the broader SQLite community think to libSQL? Do you all like it? Is anyone using it in production?

I use PostgreSQL in production, and in development for my cloud apps, but can't deny there's something very enticing about using SQLite for everything.


r/sqlite • • Sep 27 '22

SQLite GUI

35 Upvotes

Hello. I am looking for an SQLite GUI frontend to create databases and tables as well as viewing and editing. The first database I will create will be an embedded database used in a Delphi program if this makes a difference. I'm looking for something that is relatively current, with a straightforward installation, runs in Windows, and is free/low cost. Which do you recommend?

Thanks.


r/sqlite • • Mar 11 '26

A new Lightweight, WASM-powered SQLite Playground

34 Upvotes

Hey r/sqlite,

I'm sharing a project I've been working on: a client-side SQLite Playground.

I am a teacher at a technical school in Brazil, and I built this primarily as a teaching tool for my SQL classes. I wanted an environment simpler than db-fiddle, where students could just jump in and practice without any friction or distractions.

It features:

  • A clean "IDE-like" experience.

  • A persistent Database Explorer to visualize schemas in real-time.

  • A detailed log system for debugging queries.

Tech stack: Vue 3 + Vite + SQLite Wasm.

It's 100% free and runs entirely in the browser (no data ever leaves the client). I would deeply appreciate any feedback from this community on the interface, performance, or specific SQLite features/extensions you think would be valuable for educational purposes.

Thanks!

Link: https://fasttools.dev/en/sql-playground


r/sqlite • • Jun 24 '26

Where to store my 500k-row SQLite database?

32 Upvotes

I have a csv file which will be turned to an SQLite database (480k rows). Content: 5 years of real estate transaction statistics. I'll update the database twice a year with fresh data overwrite (I keep it 5 years).

I'll build a one page dashboard that prettyfies all that data with various graphs.

This is a "freemium" feature for very niche users so READ ops count will be limited.

With that context in mind, which simple, easy to use cloud database solution would you recommend? I'm a no coder, and have learned over the past 6 years how databases, backends, frontends work, i just can't write pure code. That's why simple / easy is important.

Thanks for reading.


r/sqlite • • Apr 20 '26

WAL mode gotcha: copying your .db file isn't a valid backup when WAL is enabled

32 Upvotes

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 • • Feb 24 '25

Some useful SQL(ite) tips I've learned

Thumbnail
jvt.me
32 Upvotes

r/sqlite • • Jan 11 '25

SQLite: How it works, by Richard Hipp (Guest Lecture at Saarland University, on June 25th, 2024)

Thumbnail
youtube.com
32 Upvotes

r/sqlite • • Aug 08 '24

Sqlite is the goat

32 Upvotes

I'm this type of person, who likes to do things with "cheap" equipment e.g. sqlite instead of PostgreSQL etc.

I'm building a website which basically fetches time series data every 5-10 minutes and sqlite is actually causing problems with it. Nevertheless I sat down and tried to optimize stuff and now inserts are actually quite ok (5-10k/s)

Somehow the inserts become slower the more records I have (15-20m benched) and I guess it will become even slower overtime. But will see, yolo

The sqlite website says go with a different db for Big Data but idc, I will scale this to 400-500gb with my bare hands. I like this db so much I actually go through the pain of optimizing it lmao

Also read performance is bae.

Anyone done something similar?


r/sqlite • • Oct 05 '26

Pure GO SQLite-compatible database. 75× C SQLite & 200× Turso.

31 Upvotes

I've been building musql (pronounced "muscle"), a SQLite-compatible database written from scratch.

Repo: https://github.com/samyfodil/musql

It has a `database/sql` driver that registers as `sqlite`, so switching from another SQLite driver is usually just changing the import line. It uses its own storage format (`.musq`), with columns stored contiguously and an append-only delta for writes. `musql-convert` converts existing SQLite files in and out, in both directions.

SQL compiles to VDBE bytecode, the same design as C SQLite. A JIT turns hot paths into native code on amd64 and arm64 (Linux, macOS and Windows).

There's also `musqld`, a server that speaks Turso's Hrana protocol. `@libsql/client` and `libsql-client-go` connect unchanged, and there's a 5 MB Docker image. Replication supports CRDT or leader mode; you supply the network.

For performance, these are 100k-row read workloads, averaged over an amd64 and an arm64 machine:

  • filtered `count(*)`: ~75x faster than C SQLite, ~210x faster than Turso

  • sum over a filter: ~8x faster than C SQLite

  • grouped aggregate: ~2.3x faster; `ORDER BY ... LIMIT`: ~2.4x faster

It also runs Doom. The same VM that runs SQL runs unmodified doomgeneric, compiled C -> LLVM IR -> VDBE bytecode. On an Intel i9 it gets ~38 fps on the bytecode interpreter and ~96 fps with the JIT. The idea came from Turso's demo. You can try it with:

It's early. I'd appreciate feedback on the API and the Hrana server, or a bug report if your SQL breaks. A failing query helps a lot.


r/sqlite • • Aug 03 '26

Richard Hipp: Reliability Lessons From SQLite

31 Upvotes

Richard's recent talk from SSW. It is excellent; thought you all would enjoy!

https://youtu.be/V_qzqY1bb7I


r/sqlite • • Jul 31 '26

SQLite for an enterprise inventory system

31 Upvotes

Against all odds, I developed a business inventory system using SQLite. It handles invoicing, purchasing, sales, consumption, transfers, multiple warehouses, product serial numbers, and bills of materials (BOM). Naturally, it works both locally and on a server. Of course, you can't have 1,000 users writing to the database at the exact same time... but it works.
https://github.com/sysmaya/Control-Kardex-Inventario


r/sqlite • • Dec 11 '25

Litestream VFS

Thumbnail
fly.io
31 Upvotes

r/sqlite • • Sep 12 '24

SQLite is not a toy database

Thumbnail
antonz.org
31 Upvotes

r/sqlite • • Dec 06 '23

JSONB has landed (sqlite.org)

Thumbnail sqlite.org
31 Upvotes

r/sqlite • • Jul 30 '25

Understanding why a database with only 32MB of data ends up being 2+GB big

30 Upvotes

Hi, I'm trying to understand why I have a database that is becoming huge when there is relatively very little data in it.

The database has a single table which is used for capturing logs and only ever has new rows added to it. Existing rows are never deleted or updated. One of the columns is a JSON column, with virtual columns based on specific JSON values, and there are indexes on those virtual columns. This is the full schema:

CREATE TABLE slog (id INTEGER PRIMARY KEY, time datetime, message TEXT, level INTEGER, attrs JSON, area TEXT GENERATED ALWAYS AS (json_extract(attrs, '$.area.Value')) VIRTUAL, system TEXT GENERATED ALWAYS AS (json_extract(attrs, '$.system.Value.name.Value')) VIRTUAL, username TEXT GENERATED ALWAYS AS (json_extract(attrs, '$.user.Value.name.Value')) VIRTUAL);
CREATE INDEX idx_slog_time ON slog(time);
CREATE INDEX idx_slog_level ON slog(level);
CREATE INDEX idx_slog_area ON slog(area);
CREATE INDEX idx_slog_system ON slog(system);
CREATE INDEX idx_slog_username ON slog(username);

We are also using litestream to backup the database to an S3 bucket. WAL mode is enabled.

This is on an industrial machine, and we have a few identical machines in production, not all of which show the problem. One machine has a database that is around the same size as the data in it. In one case, though, the database is 2.7GB big, even though there is only about 32MB of actual data in it. In another, that same database expanded to take up the entire SD card it is on (64GB). Unfortunately on that one because the entire card was filled I couldn't take a look at the database and try VACUUMing it or anything like that, and just deleted the database and restart it.

Running sqlite3_analyzer on the 2.7GB database gives the following:

$ sqlite3_analyzer log.db  
\** Disk-Space Utilization Report For log.db  
  
Page size in bytes................................ 4096        
Pages in the whole file (measured)................ 693481      
Pages in the whole file (calculated).............. 693481      
Pages that store data............................. 8321         1.2%   
Pages on the freelist (per header)................ 685159      98.8%   
Pages on the freelist (calculated)................ 685159      98.8%   
Pages of auto-vacuum overhead..................... 0            0.0%   
Number of tables in the database.................. 4           
Number of WITHOUT ROWID tables.................... 0           
Number of indices................................. 5           
Number of defined indices......................... 5           
Number of implied indices......................... 0           
Size of the file in bytes......................... 2840498176  
Bytes of user payload stored...................... 24799927     0.87%

...

I would understand having such a huge amount of free pages if a lot of data had been deleted or updated, but I thought that if only new rows are written, this shouldn't happen.

I know I can just VACUUM periodically to avoid this, but I would like to understand what is happening in the first place. Does anyone have any ideas?

Edit: Well, this is embarrassing. I remembered that we _used_ to periodically purge the log data that was older than a certain date. We've since turned that off, but that machine is running older software still that does the purge, so my statement that "we never do deletes" is patently false. So, basically, nothing to see here, folks! Everything is working as normal.


r/sqlite • • May 03 '26

Proxy and Replicate MySQL and PostreSQL to the edge with SQLite

Post image
29 Upvotes

HA can proxy connections to PostgreSQL and MySQL databases, replicating their data to achieve high availability and enable faster queries.

HA SQLite