Skip to content
Contents

Performance

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.

SQLiteRindle
QuerySQLiteRindleRindle vs. SQLite
Page: one genre's 100 longest tracks12.9 µs15.2 µs1.2× slower
Top 50: top 50 tracks by length6.58 µs7.92 µs1.2× slower
Nested: 10 albums, 10 newest tracks each23.6 µs21 µs1.1× faster
Full join: all albums with all their tracks10.1 ms10.9 ms1.1× slower
EXISTS: 100 newest albums with a track in a genre42.1 µs229 µs5.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.

SQLite re-runRindle update
QuerySQLite re-runRindle updateRindle vs. SQLite re-run
Top 50: top 50 tracks by length9.15 µs2.04 µs4.5× faster
Nested: 10 albums, 10 newest tracks each20.8 µs2.03 µs10× faster
EXISTS: 100 newest albums with a track in a genre43.9 µs2.06 µs21× faster
Page: one genre's 100 longest tracks15 µs1.98 µs7.6× faster
Full join: all albums with all their tracks10.3 ms2.52 µs4,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.

QueryCPU/s
SQLite
CPU/s
Rindle
RindleStaleness
SQLite
Staleness
Rindle
Rindle
top 50 tracks by length1.83 µs0.034 µs54× cheaper2.5 s2.04 µs1,200,000× fresher
one genre's 100 longest tracks3 µs0.033 µs91× cheaper2.5 s1.98 µs1,300,000× fresher
10 albums, 10 newest tracks each4.16 µs0.034 µs120× cheaper2.5 s2.03 µs1,200,000× fresher
100 newest albums with a track in a genre8.77 µs0.034 µs260× cheaper2.5 s2.06 µs1,200,000× fresher
all albums with all their tracks2.05 ms0.042 µs49,000× cheaper2.51 s2.52 µs990,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.

WriteINSERT INTO Track
(…, AlbumId = 7,
 GenreId = 2 /* Jazz */,
 MediaTypeId = 1 /* audio */)
Track WHERE AlbumId = 7 …updated

This 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 queriesSQLite, re-run allRindle, per writeRindle vs. SQLite re-run
114.9 µs2.05 µs7.2× faster
863.4 µs2.36 µs27× faster
64698 µs2.35 µs300× faster
5126.01 ms5.71 µs1,100× faster
1,02412.1 ms12.2 µs990× 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 */ …
One pipeline: Album WHERE ArtistId = ?
20 newest albums, 5 newest tracks each
AC/DCMetallicaIron Maiden…

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 watchingSQLite, re-run allRindle, per writeRindle vs. SQLite re-run
1001.31 ms5.09 µs260× faster
1,00012.7 ms5.53 µs2,300× faster
5,00063.7 ms5.59 µs11,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).

W ≈ min ( 50,000 , 500,000 Q⋅S )

An app has:

  1. W writes per second
  2. Q live queries
  3. Not every write reaches every query — some are selective. Call that selectivity S
  4. Q · S is the number of queries one write is actually derived into, and W · Q · S is 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):

  • 1 query: ~50,000 writes/s
  • 10 queries: ~50,000
  • 64 queries: ~7,800
  • 500 queries: ~1,000
  • 50,000 queries: ~10

If a write has a 1% chance of touching any one query (S = 0.01):

  • 100 queries (Q · S = 1): ~50,000 writes/s
  • 1,000 queries (Q · S = 10): ~50,000
  • 50,000 queries (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.

Where delivery stops keeping up
1 query sees allone unfiltered channel query: every write is derived into it64 queries see allthe same query 64 times over, so one write is derived 64 times256 queries see all256 derivations per write1,024 queries see all1,024 derivations per write — the pathological case, drawn so the shape is honest1,000 own listsa per-person list: the write carries one person's key, so it is derived once100 own pagesthe same, over a three-deep page: tags through a junction, owner, creator, top comments with their authorsheldwrite-boundbehind
10ms100ms1s10s1k10k100kOffered write rate (rows/s)Delivery lag, p99write ceiling, nothing registered — 264k1 query sees all: offered 60k rows/s, delivered 60k, p99 2.67ms — held1 query sees all: offered 100k rows/s, delivered 99.8k, p99 7.2ms — held1 query sees all: offered 130k rows/s, delivered 127k, p99 21.8ms — held1 query sees all64 queries see all: offered 10k rows/s, delivered 10k, p99 9.15ms — held64 queries see all: offered 25k rows/s, delivered 25k, p99 74.3ms — held64 queries see all: offered 45k rows/s, delivered 45k, p99 93.4ms — held64 queries see all: offered 65k rows/s, delivered 58.8k, p99 960ms — delivery fell behind64 queries see all: offered 90k rows/s, delivered 57.8k, p99 3.67s — delivery fell behind64 queries see all256 queries see all: offered 2k rows/s, delivered 2.01k, p99 23.7ms — held256 queries see all: offered 5k rows/s, delivered 5k, p99 35.5ms — held256 queries see all: offered 10k rows/s, delivered 9.99k, p99 122ms — held256 queries see all: offered 16k rows/s, delivered 14.6k, p99 922ms — delivery fell behind256 queries see all: offered 25k rows/s, delivered 13.4k, p99 8.56s — delivery fell behind256 queries see all1,024 queries see all: offered 500 rows/s, delivered 502, p99 88.9ms — held1,024 queries see all: offered 1.5k rows/s, delivered 1.5k, p99 93.7ms — held1,024 queries see all: offered 4k rows/s, delivered 2.52k, p99 5.84s — delivery fell behind1,024 queries see all: offered 10k rows/s, delivered 2.46k, p99 30.4s — delivery fell behind, 212 queries shed1,024 queries see all1,000 own lists: offered 20k rows/s, delivered 20k, p99 2.24ms — held1,000 own lists: offered 45k rows/s, delivered 45k, p99 3.64ms — held1,000 own lists: offered 65k rows/s, delivered 65k, p99 13.2ms — held1,000 own lists: offered 80k rows/s, delivered 73.9k, p99 40.6ms — write-bound — delivery kept up, the write path did not reach the offer1,000 own lists100 own pages: offered 10k rows/s, delivered 10k, p99 2.52ms — held100 own pages: offered 30k rows/s, delivered 30k, p99 3.27ms — held100 own pages: offered 55k rows/s, delivered 55k, p99 4.81ms — held100 own pages: offered 75k rows/s, delivered 69.3k, p99 42.2ms — write-bound — delivery kept up, the write path did not reach the offer100 own pages

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
Where delivery stops keeping up — every rung, including the ones past the knee. held = the daemon took everything offered and delivered it all; write-bound = delivery kept up but the write path did not reach the offer, which is a ceiling and not a knee; behind = delivery fell behind, which is the knee. A non-zero shed means the lateness trigger dropped queries, so that row is a rate across pipelines some of which stopped being maintained. Peak late is the worst query's lateness when the senders stopped, against the 10-second budget that triggers a shed — which is why a rung can be far behind and shed nothing. † marks a rung whose frontier never converged inside the drain deadline; ‡ one whose tail is more than 20× its median, expected right of the knee and never quoted as a rate.
ShapeOfferedCommits/sDelivered/sSustainLag p50Lag p99Shed · peak lateVerdict
1 query sees allQ×S = 160k60k60k100%639µs2.67ms0 · 0msheld
100k100k99.8k100%1.23ms7.2ms0 · 0msheld
130k127k127k100%17.4ms21.8ms0 · 0msheld
64 queries see allQ×S = 6410k10k10k100%2ms9.15ms0 · 0msheld
25k25k25k100%2.32ms74.3ms0 · 0msheld‡
45k45k45k100%3.52ms93.4ms0 · 2msheld‡
65k65k58.8k91%331ms960ms0 · 893msbehind
90k90k57.8k64%1.63s3.67s0 · 2.08sbehind
256 queries see allQ×S = 2562k2.01k2.01k100%6.86ms23.7ms0 · 0msheld
5k5.01k5k100%6.37ms35.5ms0 · 0msheld
10k10k9.99k100%9.53ms122ms0 · 1msheld
16k16k14.6k91%306ms922ms0 · 865msbehind
25k25k13.4k54%3.89s8.56s0 · 4.15sbehind
1,024 queries see allQ×S = 1,024500503502100%25.7ms88.9ms0 · 1msheld
1.5k1.51k1.5k100%25.1ms93.7ms0 · 0msheld
4k4.01k2.52k63%2.85s5.84s0 · 3.58sbehind
10k10k2.46k25%15.1s30.4s212 · 7.35sbehind
1,000 own listsQ×S = 120k20k20k100%1.05ms2.24ms0 · 0msheld
45k45k45k100%1.48ms3.64ms0 · 0msheld
65k65k65k100%2.52ms13.2ms0 · 0msheld
80k73.9k73.9k100%32.6ms40.6ms0 · 0mswrite-bound
100 own pagesQ×S = 110k10k10k100%1.23ms2.52ms0 · 0msheld
30k30k30k100%1.21ms3.27ms0 · 0msheld
55k55k55k100%1.75ms4.81ms0 · 0msheld
75k69.3k69.3k100%34.4ms42.2ms0 · 0mswrite-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.

  1. Query indexing - updates can skip queries that include equality predicates. E.g., SELECT * FROM foo WHERE bar = X. A write whose bar column does not equal X will skip visiting this query.
  2. 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 of bar and baz. 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 queriesRindle memoryPer queryPer maintained row
100160 KB1.6 KB195 B
1,0001.35 MB1.35 KB182 B
5,0006.64 MB1.33 KB181 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).