Rindle’s goal is a query system that is great at both halves of a live query: getting the first result, and keeping it up to date. We track four things: time to first result, time for each update, how update time grows with the number of queries, and how memory grows with the number of queries.
The Hydrate, Update, Fan-Out and Memory tabs run on Chinook ×30 (105k tracks), in-process, on
the same data. Rindle in sink mode over its paged store vs. SQLite re-running the query, with
matching index keys and full-row index coverage on both sides. MacBook Pro M5 Pro. Source:
triangle bench; each
chart names its raw results file. The Throughput tab is a different
measurement — a real rindled in its own process, driven over HTTP and WebSocket by
loadgen — and carries its own
provenance.
Hydrate is the time to create a live query and return its first result. A live query does more work for its first result than a classic query, because it has to do some setup to keep the result current later. On Page, Top 50, Nested and Full join, the two systems return their first result within about 20% of each other in this run. SQLite is ahead on Page, Top 50 and Full join; Rindle is slightly ahead on Nested. EXISTS costs Rindle more to hydrate, while keeping it current is much cheaper per write, as the Update tab shows.
| Query | SQLite | Rindle | Rindle vs. SQLite |
|---|---|---|---|
| Page: one genre's 100 longest tracks | 12.9 µs | 15.2 µs | 1.2× slower |
| Top 50: top 50 tracks by length | 6.58 µs | 7.92 µs | 1.2× slower |
| Nested: 10 albums, 10 newest tracks each | 23.6 µs | 21 µs | 1.1× faster |
| Full join: all albums with all their tracks | 10.1 ms | 10.9 ms | 1.1× slower |
| EXISTS: 100 newest albums with a track in a genre | 42.1 µs | 229 µs | 5.5× slower |
Each query has its own scale, so compare the two columns within a query, not across queries.
Measured 2026-10-23 (2026-10-23-apple-m5-pro-fair.txt).
Update is the time to get a new result after data changes. A classic database has to re-run the query from scratch, while Rindle only does work in proportion to the size of the edit. The advantage depends on how expensive the original query was.
| Query | SQLite re-run | Rindle update | Rindle vs. SQLite re-run |
|---|---|---|---|
| Top 50: top 50 tracks by length | 9.15 µs | 2.04 µs | 4.5× faster |
| Nested: 10 albums, 10 newest tracks each | 20.8 µs | 2.03 µs | 10× faster |
| EXISTS: 100 newest albums with a track in a genre | 43.9 µs | 2.06 µs | 21× faster |
| Page: one genre's 100 longest tracks | 15 µs | 1.98 µs | 7.6× faster |
| Full join: all albums with all their tracks | 10.3 ms | 2.52 µs | 4,100× faster |
Each query has its own scale. Measured 2026-10-23 (2026-10-23-apple-m5-pro-fair.txt).
Polling
Most apps want to know when a query’s result changes so they can do something in response. Without live queries, these apps often resort to polling. With Rindle, polling is unnecessary: Rindle does no work while the data is unchanged, and tells the app the moment a new result is ready.
This table models what polling costs, in CPU and in staleness, for a given poll rate and rate of change. Move the sliders to try different settings.
| Query | CPU/s SQLite | CPU/s Rindle | Rindle | Staleness SQLite | Staleness Rindle | Rindle |
|---|---|---|---|---|---|---|
| top 50 tracks by length | 1.83 µs | 0.034 µs | 54× cheaper | 2.5 s | 2.04 µs | 1,200,000× fresher |
| one genre's 100 longest tracks | 3 µs | 0.033 µs | 91× cheaper | 2.5 s | 1.98 µs | 1,300,000× fresher |
| 10 albums, 10 newest tracks each | 4.16 µs | 0.034 µs | 120× cheaper | 2.5 s | 2.03 µs | 1,200,000× fresher |
| 100 newest albums with a track in a genre | 8.77 µs | 0.034 µs | 260× cheaper | 2.5 s | 2.06 µs | 1,200,000× fresher |
| all albums with all their tracks | 2.05 ms | 0.042 µs | 49,000× cheaper | 2.51 s | 2.52 µs | 990,000× fresher |
Polling CPU is the re-run time divided by the poll interval, paid whether or not anything changed. Rindle CPU is the update time per change. Staleness is the average time from a write to the new result. For 1,000 people watching, polling multiplies by 1,000; Rindle doesn’t, which is the Fan-out tab.
In most apps, one write can affect many live queries. We call this fan-out. When a query filters
on a specific column and value, like AlbumId = 7, Rindle indexes the query by that value and only
checks it when a write touches a row with that value. Every other query never sees the write at
all.
(…, AlbumId = 7,
GenreId = 2 /* Jazz */,
MediaTypeId = 1 /* audio */)
Track WHERE GenreId = 1 /* Rock */ …skippedTrack WHERE AlbumId = 7 …updatedTrack WHERE MediaTypeId = 3 /* video */ …skippedThis works for column = value filters. Other filters, like ranges, are checked against
each write.
As the number of live queries grows, the cost to re-run grows linearly, but Rindle’s cost grows far more slowly.
| Live queries | SQLite, re-run all | Rindle, per write | Rindle vs. SQLite re-run |
|---|---|---|---|
| 1 | 14.9 µs | 2.05 µs | 7.2× faster |
| 8 | 63.4 µs | 2.36 µs | 27× faster |
| 64 | 698 µs | 2.35 µs | 300× faster |
| 512 | 6.01 ms | 5.71 µs | 1,100× faster |
| 1,024 | 12.1 ms | 12.2 µs | 990× faster |
Each live query is a genre’s or an album’s 100 longest tracks, alternating. Each write is a
new track. Measured 2026-10-23 (the fanout_mixed cell, 2026-10-23-apple-m5-pro-fair.txt).
Query Families
Many live queries are actually the same query with a single different filter value: each person’s own issues, each team’s own channel, etc. Rindle recognizes these and collapses them into a single query family.
Album WHERE ArtistId = 1 /* AC/DC */ …Album WHERE ArtistId = 50 /* Metallica */ …Album WHERE ArtistId = 90 /* Iron Maiden */ …Album WHERE ArtistId = ?20 newest albums, 5 newest tracks each
A new track on a Metallica album reaches only Metallica’s partition.
Sharing a pipeline makes each write cheap, even when it lands on a related table, like a new track, where the index can’t tell whose list it belongs to. It also saves memory.
| People watching | SQLite, re-run all | Rindle, per write | Rindle vs. SQLite re-run |
|---|---|---|---|
| 100 | 1.31 ms | 5.09 µs | 260× faster |
| 1,000 | 12.7 ms | 5.53 µs | 2,300× faster |
| 5,000 | 63.7 ms | 5.59 µs | 11,000× faster |
Each person watches their artist’s 20 newest albums, each with its 5 newest tracks. Each
write adds a track to one watched album, so one person’s result changes. Measured 2026-10-23 (the
family cell, 2026-10-23-apple-m5-pro-fair-family.txt).
An app has:
Wwrites per secondQlive queries- Not every write reaches every query — some are selective. Call that selectivity
S Q · Sis the number of queries one write is actually derived into, andW · Q · Sis the updates per second the engine is doing
Only the product Q · S matters, which is why 500 queries that each see every write and 50,000
queries that each have a 1% chance of seeing one are the same load. Where that product puts you
decides which of two regimes you are in, and they behave nothing alike.
Below about ten queries per write, more queries are close to free. The limit is the write
path, at roughly 50,000 writes a second, and it barely moves as you add queries: one query that
sees every write and a thousand per-person queries land within a factor of two of each other.
This is the regime selectivity buys you — a write that matches no query’s column = value filter
is never derived at all, so a thousand selective queries sit here rather than down in the
division.
Above it, you divide a derive budget of roughly 500,000 a second. Every pipeline a write
lands in is real work, and the sustainable write rate falls as 1 / (Q · S).
If every query sees every write (S = 1):
1query: ~50,000writes/s10queries: ~50,00064queries: ~7,800500queries: ~1,00050,000queries: ~10
If a write has a 1% chance of touching any one query (S = 0.01):
100queries (Q · S = 1): ~50,000writes/s1,000queries (Q · S = 10): ~50,00050,000queries (Q · S = 500): ~1,000
Both constants are rounded down from what one IVM worker measured, so the model
under-promises by between 1.1× and 6× rather than over-promising anywhere. The chart below is
where they come from: the knees sit at a roughly constant product of 1.5 to 2.9 million derives a
second on these shapes, and about a third of that on a heavier windowed query, so 500,000 sits
under the lowest of them. By Q · S ≈ 1,000 the budget itself has begun to sag, which is the one
place a straight division flatters the system.
250,000 writes a second is the write path with nothing registered at all — no live query,
no IVM. It is the ceiling the chart draws rather than a rate an app with live queries operates
at: simply having queries on a table costs about half of it, even when no write matches one.
Where a shape stops keeping up
The formula above compresses the one thing it cannot show: where a given shape stops keeping up, and what happens just past that point. A live query that has fallen behind is not slow, it is stale — so the question worth measuring is which offered write rate is the last one whose result still reaches a subscriber in milliseconds.
Each series below holds one shape fixed and paces the writers through a sequence of offered write
rates. Latency stays flat while the engine keeps up and goes vertical when it stops; the large
marker is the last rate that held, and Q · S is the number of pipelines one write is actually
derived into. The first four series are the same query registered many times, so every write is
derived into every one of them. The last two are a query per person, where a write carries one
person’s key and is derived once.
1 query sees all: 127k rows/s at 21.8ms p99, no knee below the write ceiling64 queries see all: 45k rows/s at 93.4ms p99, behind at 65k256 queries see all: 9.99k rows/s at 122ms p99, behind at 16k1,024 queries see all: 1.5k rows/s at 93.7ms p99, behind at 4k1,000 own lists: 65k rows/s at 13.2ms p99, no knee below the write ceiling100 own pages: 55k rows/s at 4.81ms p99, no knee below the write ceiling
Numbers
| Shape | Offered | Commits/s | Delivered/s | Sustain | Lag p50 | Lag p99 | Shed · peak late | Verdict |
|---|---|---|---|---|---|---|---|---|
| 1 query sees allQ×S = 1 | 60k | 60k | 60k | 100% | 639µs | 2.67ms | 0 · 0ms | held |
| 100k | 100k | 99.8k | 100% | 1.23ms | 7.2ms | 0 · 0ms | held | |
| 130k | 127k | 127k | 100% | 17.4ms | 21.8ms | 0 · 0ms | held | |
| 64 queries see allQ×S = 64 | 10k | 10k | 10k | 100% | 2ms | 9.15ms | 0 · 0ms | held |
| 25k | 25k | 25k | 100% | 2.32ms | 74.3ms | 0 · 0ms | held‡ | |
| 45k | 45k | 45k | 100% | 3.52ms | 93.4ms | 0 · 2ms | held‡ | |
| 65k | 65k | 58.8k | 91% | 331ms | 960ms | 0 · 893ms | behind | |
| 90k | 90k | 57.8k | 64% | 1.63s | 3.67s | 0 · 2.08s | behind | |
| 256 queries see allQ×S = 256 | 2k | 2.01k | 2.01k | 100% | 6.86ms | 23.7ms | 0 · 0ms | held |
| 5k | 5.01k | 5k | 100% | 6.37ms | 35.5ms | 0 · 0ms | held | |
| 10k | 10k | 9.99k | 100% | 9.53ms | 122ms | 0 · 1ms | held | |
| 16k | 16k | 14.6k | 91% | 306ms | 922ms | 0 · 865ms | behind | |
| 25k | 25k | 13.4k | 54% | 3.89s | 8.56s | 0 · 4.15s | behind | |
| 1,024 queries see allQ×S = 1,024 | 500 | 503 | 502 | 100% | 25.7ms | 88.9ms | 0 · 1ms | held |
| 1.5k | 1.51k | 1.5k | 100% | 25.1ms | 93.7ms | 0 · 0ms | held | |
| 4k | 4.01k | 2.52k | 63% | 2.85s | 5.84s | 0 · 3.58s | behind | |
| 10k | 10k | 2.46k | 25% | 15.1s | 30.4s | 212 · 7.35s | behind | |
| 1,000 own listsQ×S = 1 | 20k | 20k | 20k | 100% | 1.05ms | 2.24ms | 0 · 0ms | held |
| 45k | 45k | 45k | 100% | 1.48ms | 3.64ms | 0 · 0ms | held | |
| 65k | 65k | 65k | 100% | 2.52ms | 13.2ms | 0 · 0ms | held | |
| 80k | 73.9k | 73.9k | 100% | 32.6ms | 40.6ms | 0 · 0ms | write-bound | |
| 100 own pagesQ×S = 1 | 10k | 10k | 10k | 100% | 1.23ms | 2.52ms | 0 · 0ms | held |
| 30k | 30k | 30k | 100% | 1.21ms | 3.27ms | 0 · 0ms | held | |
| 55k | 55k | 55k | 100% | 1.75ms | 4.81ms | 0 · 0ms | held | |
| 75k | 69.3k | 69.3k | 100% | 34.4ms | 42.2ms | 0 · 0ms | write-bound |
Apple M5 Pro, 15 logical cpu, 24 GiB, Mac17,9; macOS 26.7.1 (25G241) · 2026-11-05 · NOT pinned — one IVM worker, whole machine available; not a per-vCPU figure · RECORDED FROM A DIRTY TREE, so the archive names no committed tree · daemon in its own process · rust/rindle-loadgen/results/2026-11-05-mac179
Two readings the chart is drawn to support. A series that runs into the vertical rule is
write-bound — delivery kept up with everything it was given and the write path simply could
not offer more, which is a ceiling rather than a knee. And past a real knee the daemon does not
slow down evenly: it drops a query that cannot keep up and re-hydrates it, on a ten-second
lateness budget, because a writer must never wait on IVM. That is what the shed column is for —
a row with a shed in it is a rate across pipelines some of which stopped being maintained partway,
which is not a rate at all.
Can We Scale Further?
Just like indices can speed up initial query hydration, optimizations exist to speed up query
updates. Both of them work by lowering Q · S, which is to say both are ways of moving out of
the divided regime and into the flat one.
- Query indexing - updates can skip queries that include equality predicates. E.g.,
SELECT * FROM foo WHERE bar = X. A write whosebarcolumn does not equalXwill skip visiting this query. - Query families - Queries that only differ in parameter bindings can collapse to a single query. E.g.,
SELECT * FROM foo WHERE bar = ? AND baz = ?can become 1 pipeline for all distinct bindings ofbarandbaz. In other words, if your queries collapse into a few templates you can scale into tens of thousands of instantiations of those queries without bending write rate.
- (1) lowers
S: a write that does not match a query’s value is never derived into it - (2) lowers
Q: many bindings collapse into one pipeline
Neither makes a live query free. Skipping the derive removes the term that dominates above the knee, but a registered query still costs the write path something even when no write ever matches it — measured, a hundred to two thousand never-matching queries hold the write rate at roughly 90,000 to 113,000 a second against 259,000 with nothing registered at all. Being watched is the first cost; being derived is the one that scales.
Both 1 and 2 have restrictions in terms of the operators and query shapes they support.
The above measurements reflect running Rindle with a single IVM worker. You can sustain more unique queries by adding more workers, up to 4 workers. Perf currently falls off upon adding the 5th worker.
An incremental engine has to remember something about each live query so it can update it later. If that memory grows with the size of the tables, live queries get expensive fast.
Rindle collapses large numbers of active queries into a small number of query families, reducing memory usage to a small constant factor of maintained rows.
| Live queries | Rindle memory | Per query | Per maintained row |
|---|---|---|---|
| 100 | 160 KB | 1.6 KB | 195 B |
| 1,000 | 1.35 MB | 1.35 KB | 182 B |
| 5,000 | 6.64 MB | 1.33 KB | 181 B |
Each query is an album’s 10 longest tracks. Engine memory only, not counting the results
sent to clients or the database itself. Measured 2026-10-23 (the family_page10 cell,
2026-10-23-apple-m5-pro-fair-family.txt).