#sqlite

35 bookmarks tagged with #sqlite · RSS Feed · ← All Tags

Actually Queryable Executables | Farid Zakaria’s Blog

https://fzakaria.com/2026/08/24/actually-queryable-executables
Turns out that when we re-envision what we considered to be simply a byte layout specification was actually better off being a database, a lot of machinery we have been using for decades simply stops being necessary. The program is the database, and the database is the program.

Many Small Queries Are Efficient In SQLite

https://www.sqlite.org/np1queryprob.html
N+1 Queries Are Not A Problem With SQLite SQLite is not client/server, however. The SQLite database runs in the same process address space as the application. Queries do not involve message round-trips, only a function call. The latency of a single SQL query is far less in SQLite. Hence, using a large number of queries with SQLite is not the problem.

You Want Technology With Warts

https://entropicthoughts.com/you-want-technology-with-warts
Every single wart that annoys us today, used to be a reasonable feature that someone relied on in their production code. Every wart we see today is a testament to the care the maintainers put into backward compatibility. If we choose a technology today, we want one that saves us from future maintenance by keeping our wartful code running – even if we don’t yet know it is wartful. The best indicator of this is whether the technology has warts today.

What to do about SQLITE_BUSY errors despite setting a timeout - Bert Hubert's writings

https://berthub.eu/articles/posts/a-brief-post-on-sqlite3-database-locked-despite-timeout/
The tl;dr on this, to prevent SQLITE_BUSY errors even when setting a timeout, don’t ever upgrade transactions to read-write. If you know you are going to write in a transaction, use ‘BEGIN IMMEDIATE’, or start off with the write. But do read on for why this is so, and how other databases struggle with this problem as well.

The definitive guide to using Django with SQLite in production | alldjango.com

https://alldjango.com/articles/definitive-guide-to-using-django-sqlite-in-production
Especially for side projects with limited traffic requirements and scaling concerns, the promise of SQLite is that it can remove a lot of ongoing hassles. Without a separate database, cache, or queue, there is less network traffic (because the SQLite file is local), and less servers to manage, maintain, and backup.

DB Browser for SQLite

https://sqlitebrowser.org/
DB Browser for SQLite (DB4S) is a high quality, visual, open source tool designed for people who want to create, search, and edit SQLite or SQLCipher database files. DB4S gives a familiar spreadsheet-like interface on the database in addition to providing a full SQL query facility. It works with Windows, macOS, and most versions of Linux and Unix. Documentation for the program is on the wiki.

SQLite Index Visualization: Structure

https://mrsuh.com/articles/2024/sqlite-index-visualization-structure/
After learning about indexes, I understood their basic structure, but I wanted to dig deeper — to explore the data structure, understand the algorithm, and learn how the index data is stored on disk. The theory and actual implementation can differ, so I decided to explore this topic further.

Cron-based backup - Litestream

https://litestream.io/alternatives/cron/
Sometimes Litestream can be overkill for projects with a small database that do not have high durability requirements. In these cases, it may be more appropriate to simply back up your database daily or hourly. This approach can also be used in conjunction with Litestream as a fallback. You can never have too many backups!

Using SQLite as Storage for Web Server Static Content – Internal Tools Deployment Platform | Clace

https://clace.io/blog/sqlite/
For Clace, the decision was made to use SQLite for app files storage instead of using the file system. The reasoning was mainly to be able to do atomic version changes. When updating an app, since there could be lots of files being updated, using a database would allow all changes to be done atomically in a transaction. This would prevent broken web pages from being served during a version change.

Introducing sqlite-lembed: A SQLite extension for generating text embeddings locally | Alex Garcia's Blog

https://alexgarcia.xyz/blog/2024/sqlite-lembed-init/index.html
sqlite-lembed is a SQLite extension for generating text embeddings, meant to work alongside sqlite-vec. With a single embeddings model file provided in the .gguf format, you can generate embeddings using regular SQL functions, and store them directly inside your SQLite database. No extra server, process, or configuration needed!

Hybrid full-text search and vector search with SQLite | Alex Garcia's Blog

https://alexgarcia.xyz/blog/2024/sqlite-vec-hybrid-search/index.html
You can use SQLite's builtin full-text search (FTS5) extension and semantic search with sqlite-vec to create "hybrid search" in your applications. You can combine results using different methods like keyword-first, re-ranking by "semantics", and reciprocal rank fusion. Best of all, since it's all in SQLite, experiments and prototypes are cheap and easy, no 3rd party services required!

SQLite as a document database

https://dgl.cx/2020/06/sqlite-json-support
This makes it possible to insert JSON straight into SQLite and then have it extract data and index them, i.e. you can treat SQLite as a document database. This has been possible with PostgreSQL and obviously is what something like Elastic provides but having it available in an embedded database is very nice for lightweight stuff.