From e5d9b792497ccbc71ccd777497d40c7a8f8c23bf Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 28 Sep 2026 04:06:22 +0100 Subject: Record queries on the bank beside SQLite (091) 091 measures four queries on pgbench's tables of 100,000 accounts, the same rows and answers on Pure (registered queries, HTTP and JSON included) and SQLite 3.46.1, through each step: items field by field in leaves, folds and filters a leaf at a time, and one pass answering a fold in a column for every row. Per-branch totals went from 398 ms to 4.9 ms (SQLite 45, 14.3 with a DBA's indexes), a three-table join from 3.3 to 0.48 ms (1.47), and each rich account's rank from 9.2 s to 6.8 ms (2.84 s, 7.6 ms with an index); counting accounts in credit takes 1.05 ms where an index lets SQLite count 0.16 ms. Pure declares no index. --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2e70e11..4fbb74a 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,17 @@ reads never wait for a sync. What an app sends is saved with its event and deliv batches, and a receiving app applies each message once; sealed to the receiver's key (HPKE, one session a wire, authenticated by the sender's key), no relay between them can read or change it, at the speed of unsealed sends. People use a node through surfaces it runs, reading its states where they are (Vega's display: a two-node messenger -shows a line on the other node's screen in about a millisecond). Measurements against axum and drogon on a Raspberry Pi 5 +shows a line on the other node's screen in about a millisecond). Queries are modules too: the app's states with views of +their own (`aup query`), verified when registered and shown from snapshots. Folds run a leaf of a list at a time and a +fold in a table's column is answered for every row from one pass over its list, so on pgbench's tables of 100,000 +accounts a group-by, a join and a correlated rank run 3–420x faster than on SQLite, and faster than SQLite given a +DBA's indexes but for one count, with no index declared. Measurements against axum and drogon on a Raspberry Pi 5 are in [075](docs/research/075-http-host-against-axum.md), [077](docs/research/077-apps-as-http-services.md), [080](docs/research/080-snapshot-reads.md), [081](docs/research/081-tail-records.md), [082](docs/research/082-json-in-place.md), [083](docs/research/083-delivery-over-http.md), [086](docs/research/086-sealed-sends.md), [087](docs/research/087-small-reads-and-idle-memory.md), -[088](docs/research/088-sealed-sessions.md), [089](docs/research/089-messenger.md) and -[090](docs/research/090-tables.md); the status table is +[088](docs/research/088-sealed-sessions.md), [089](docs/research/089-messenger.md), +[090](docs/research/090-tables.md) and [091](docs/research/091-queries.md); the status table is [CHECKPOINT.md](CHECKPOINT.md). The source follows the principle below, a small core with the rest selected around it -- cgit v1.2.3