0:00
Open any developer forum this week and
0:01
you'll find the same fight. Pinecone,
0:04
Weaviate, PGVector, or Chroma. Which
0:07
vector database should I use? I've got
0:09
some bad news for everyone in that
0:10
thread. You are all arguing about the
0:12
wrong database because the one quietly
0:14
winning the AI race isn't new at all.
0:16
It's 25 years old and it's already on
0:19
your machine. It's SQLite. SQLite isn't
0:22
just old, it's the most deployed
0:23
database on Earth. The best estimate is
0:25
over 1 trillion of them running right
0:27
now. It's inside every Android phone,
0:30
every iPhone, every Mac, and every
0:32
browser tab you have ever opened. You
0:34
are surrounded by it. And here's what
0:36
changed. In the last 2 years, this
0:38
ancient little database quietly learned
0:40
how to do AI. The project is called
0:44
It takes vector search, the engine
0:46
underneath every rag app, and drops it
0:48
straight into SQLite, which means your
0:50
whole vector database collapses into one
0:52
file, a single file. You could literally
0:54
email it to yourself. No Pinecone
0:56
account, no server to rent, no $60 a
0:59
month bill. Just a file and the SQL you
1:02
already know. That is the revolution
1:04
nobody is talking about, and it runs
1:06
deeper than one clever extension. Let me
1:08
show you. First, let's be honest about
1:10
the thing everybody copied. A normal rag
1:13
setup calls an embedding model, then
1:14
ships your vectors off to a hosted
1:16
vector database over the network, then
1:18
waits, then reranks, then hopes a good
1:20
answer comes back. That is four or five
1:23
moving parts just to find some similar
1:25
Every box in that diagram is a service
1:27
you provision, a bill you keep paying,
1:30
and one more thing that can page you at
1:31
3:00 in the morning. Pinecone's paid
1:33
tiers start around $70 a month. For a
1:36
huge number of apps, that is wildly
1:38
over-engineered. And every single query
1:40
leaves your computer. Your user's
1:42
private data takes a round trip to
1:43
somebody else's cloud just to find three
1:45
paragraphs that rhyme with the question.
1:47
That should bother you a little more
1:49
than it does. Now, the sharp teams
1:51
already sensed this. They moved to
1:53
PGVector, bolting vectors onto Postgres
1:55
so they could stop running a separate
1:57
service. Good instinct. SQLite just
1:59
takes that same instinct one giant step
2:01
further. No server at all because SQLite
2:04
is already inside your app. Same
2:06
process, same memory, zero network hops.
2:09
No connection string, no API key, no
2:12
cold start. It is just sitting there
2:14
waiting to be used. So, what does SQLite
2:17
vec actually look like? You create a
2:19
virtual table and tell it your
2:20
embeddings are say 768 numbers wide. One
2:24
statement and you have a working vector
2:27
Then you insert those embeddings right
2:28
next to your normal columns. Same table,
2:30
same file, one plain insert. Your text
2:33
and its meaning finally live in the
2:35
exact same place. And to search, you
2:37
write a select. Match against a query
2:39
vector, order by distance, limit 20.
2:41
That is a full nearest neighbor search.
2:43
The exact thing you are renting a whole
2:45
platform for and it is just SQL. Sit
2:48
with that for a second. No new query
2:50
language, no SDK to learn, no
2:52
proprietary vector dialect. If you can
2:54
write a select statement, you already
2:56
know how to do retrieval. And because it
2:58
is a real database, you can filter by
3:00
metadata in the same query. User ID,
3:03
date, a tag, and then rank by
3:05
similarity. Try doing that cleanly in a
3:07
bolt-on vector service and you'll be
3:09
there a while. Here's the part one
3:10
genuinely love. The old version,
3:14
was a nightmare to compile. Alex Garcia
3:17
threw it out and rewrote everything as
3:19
one C file with zero dependencies. You
3:21
copy it in and it just runs. There's a
3:24
companion piece too. With a sister
3:26
extension, you can run the embedding
3:27
model itself inside sicklight. Raw text
3:30
goes in, vectors come out. The entire
3:32
pipeline living in a single process.
3:35
Worried about size? It can store each
3:36
vector as compact bytes or even single
3:39
bits with a matching distance function.
3:41
That is millions of vectors packed into
3:43
a file small enough to sync over a phone
3:46
You pick the distance that fits the job.
3:48
Straight line for raw closeness, cosine
3:50
for direction, or Hamming for those bit
3:52
vectors. The knobs a real vector
3:54
database hands you right inside a select
3:57
and the same file byte for byte runs on
3:59
a laptop, a server, a $5 Raspberry Pi,
4:03
and the phone in your pocket. You write
4:05
it once and it goes wherever SQLite
4:07
already is, which is again everywhere.
4:09
My favorite trick of all, compile it to
4:11
web assembly and it runs inside the
4:13
browser. The whole retrieval step
4:15
happens in the tab. Nothing, and I mean
4:18
nothing ever leaves the user's device.
4:20
Now the honest catch, sysko died vec
4:22
checks every vector one by one. Pure
4:25
brute force, no fancy index yet. On a
4:27
normal laptop that is still tens of
4:29
milliseconds into the hundreds of
4:31
thousands, even a few million rows. Push
4:33
past that and you'll want a dedicated
4:35
engine and that is completely okay. It's
4:37
not a Python only toy either. Alex
4:40
shipped bindings for JavaScript, Go,
4:42
Rust, and Ruby. Basically every language
4:44
you'd actually reach for on a real
4:45
project, but keep coming back to that
4:47
one file idea because it is genuinely
4:50
wild. Your data, your embeddings, and
4:53
your search index all live in a single
4:54
file you can copy, drop into get, back
4:57
up, or ship inside your app's binary. It
4:59
also pairs with SQLite's built-in
5:01
full-text search. Keyword matching and
5:04
vector similarity blended together in
5:06
one query, the hybrid search that
5:08
dedicated platforms will happily sell
5:09
you a subscription for. Add all of this
5:12
up and you get local first AI, a private
5:14
assistant that works on a plane, a
5:16
search box that costs you exactly zero
5:19
Retrieval with no cloud anywhere in the
5:21
picture and you're not trapped offline
5:23
either. The lib SQL Cloud added embedded
5:26
replicas read locally at memory speed
5:28
then quietly sync the same file up to
5:30
the cloud in the background. You get
5:32
both at once. Cloudflare saw this coming
5:34
years ago. Their database D1 is just
5:37
SQLite running across hundreds of cities
5:39
on the edge generally available since
5:41
2024. Millions of little databases
5:44
spread across the planet. Each one a
5:46
plain SQLite file you already know how
5:50
So, your database can now live a few
5:51
milliseconds from every user alive, and
5:53
it is still just a SQLite file
5:55
underneath. Take a second and let that
5:57
sink in. And then AI agents showed up
6:00
and broke the math completely. An agent
6:02
doesn't want one giant shared database.
6:04
It wants its own. A private memory for
6:07
every user, every session, every single
6:09
task. Thousands of tiny databases spun
6:12
up in a millisecond and thrown away
6:13
seconds later. One company looked at
6:15
that and had a genuinely contrarian
6:17
thought. The old question was, how big
6:20
can a single database get? The new
6:21
question is, how many can you create and
6:24
how fast? That company is Turso, and
6:26
they had been circling this for years.
6:28
First, they forked SQLite into libSQL,
6:31
the open version its authors never
6:32
allowed. And then they went a lot
6:34
further. Their next move is a little bit
6:36
insane. They are rewriting SQLite from
6:38
scratch in Rust, fully in the open,
6:41
built from day one for the age of
6:42
agents. And they went straight at
6:44
SQLite's biggest weakness. For 25 years,
6:47
only one thing could write to it at a
6:49
time. Turso shipped true concurrent
6:51
writes, up to four times faster, the
6:54
feature people begged for and never got.
6:56
That is not the only thing. One year in,
6:59
they have also shipped native vector
7:00
search, change data capture, full text
7:03
search, live encryption, materialized
7:05
views, and a build that runs right in
7:08
This is a serious database now, not a
7:10
weekend science project. And how do you
7:12
trust a from-scratch database with your
7:14
data? You test it the way the aerospace
7:16
and FoundationDB people do, simulating
7:19
millions of chaotic failures
7:20
deterministically before it ever ships.
7:23
That is the bar, and the number they're
7:25
building toward is not a typo. Not
7:27
thousands of databases, not millions,
7:30
billions. Roughly one per agent, per
7:32
user, per whatever comes next. Over 200
7:35
people are contributing, and half the
7:37
core team is from outside the company.
7:39
After 25 years of a famously closed
7:41
codebase, SQLite is finally being
7:43
rebuilt in the open. And this is not
7:45
some fringe experiment. It's how Simon
7:48
Willison's tools log every model call,
7:50
how mobile apps ship a searchable
7:52
database inside the download, how
7:54
on-device AI is quietly being built
7:56
right now, today. So, am I telling you
7:58
to delete Postgres? No. At real scale,
8:01
with heavy filtering and billions of
8:03
vectors, a dedicated database still
8:05
wins. SQLite plus AI does not replace
8:08
everything, and it doesn't need to. But
8:10
that was never the point. The revolution
8:12
isn't some shiny new database. It's the
8:14
oldest, most boring one, the one already
8:17
on 4 billion devices quietly learning
8:19
how to think. SQLite plus AI. Keep an
8:22
eye on this one because almost nobody
8:24
else is. I'll see you in the next one.