PATIENT TRAJECTORY MATCHING · RESULTS

Execution store and matching: what the evidence shows

Every figure on this page is read from a committed verification report, listed at the bottom with its digest. Scale figures use synthetic patients on one machine; beyond 10,000 patients the cohort replicates a pool of 10,000 distinct patients. The MIMIC-IV figures use the open demo (100 patients) and show aggregate counts only. Nothing here is a clinical claim.

← all mockups · decisions and reasoning: docs/decisions/briefing-2026-11.md and docs/decisions/engine-increment-log.md

Matching speed at 300,000 patients

Full-detail match() over queries, with the engine's work spread over worker processes. Every query runs with the engine's default search budget, (), which is what the pages send (D41); until D41 a third of the benchmark's queries had a search budget of 1, which stopped their searches at once. The target, fixed before measuring (D21): 95th-percentile latency at most s, slowest query at most s, and query-process memory under GiB. Since D31's second attempt the target is judged by the paired confirmation: main's code () and this tree run back to back on the same snapshot and the same queries, alternating which runs first, times at each worker count, so that drift over the session falls on both; the target is read off this tree's own runs. At 14 workers the target is (p95 s); at 8 workers it is (p95 s). Earlier paired verdicts, measured with the old budgets, are kept as historical records in the decision log.

Paired confirmation: 95th-percentile query time, main's code against this tree, by worker count

main before the change ()this tree (its runs govern the target)

What the search budgets change (same code, not a code comparison)

This tree on both sides, back to back as above: the benchmark's old drawn budgets (1, 40 or 300; , a stress test) against the engine's default (). It measures what the budgets cost, governs nothing, and its differing queries are the ones whose results the budget moves.

Sequential confirmation (not the governing measure)

This tree alone, each worker count after the last, repeats of the same queries, kept for comparison with earlier reports. It does not govern the target: its later arms run after an hour or more of load, and between two such runs queries whose code had not changed drifted by 10 to 16% (D31), as much as the effects being judged; the paired protocol cancels that drift.

Building and verifying the store as the cohort grows

DuckDB writes immutable Parquet snapshots under a memory limit with one database thread. Each snapshot is identified by a digest of its canonical rows, and every build is verified by content. Single-process match times are over the main run's queries at each size (50 at 1,000 and 10,000; 10 above), at the engine's default search budget. The last column is a stress test, not a realistic mix: the same queries with the old drawn budgets (1, 40 or 300), run once at the sizes up to 10,000 (D41).

Build peak is the whole process's resident memory, about twice DuckDB's limit; the factor is unresolved (DuckDB or the allocator). The 1,000,000 snapshot is shaped by replication of the 10,000-patient pool, so its size is not a linear extrapolation.

MIMIC-IV demo: inputevents and chartevents in one store

The open MIMIC-IV demo, fetched locally and checksum-verified, never committed. Input events go through the full graph route; chart events are built in bulk from the importer's claim identity (route b), and on the demo every row and every store was also checked, not a sample.

The raw-row check recomputes every chart row from the source file with code independent of the converter. The graph route shares code with the bulk route, so on its own it checks the claim's round trip and acceptance, not the shared conversion.

Most results are not comparable: only numeric chart rows with a unit are admitted, and an excluded row of the same item might have changed the answer, so the store does not claim none there (D18).

Rises and falls: the trajectory page's rise templates on many cohorts (D36)

"The monthly seizure count rises to at least twice the mean of the readings before it" (D33's relative conditions, restored in D36 in a module no build loads). Each template, as the page's translator writes it, over distinct synthetic cohorts of 48 children (generator seeds declared before measuring). The bar fixed before measuring: at least 30 patients with a candidate and at most 30% of them unresolved, in each template. The last column runs the same requests with D35's target split switched off.

Limits of this evidence

Sources