plateauDBExperimental
Experimental · Rust and WebAssembly on OPFS

plateauDB

The browser database that stays fast at a million rows.

A local database for web apps, written in Rust and WebAssembly. Queries cost the size of the answer, not the size of the table, so your app feels the same with 10k records or 1M.

Time per operation as the table grows · Chromium
Filter by three fields
04.40 ms8.80 ms13.2 ms17.6 ms10k rows100k rows1M rowsIndexedDB 16.3 msSQLite-WASM 1.15 msplateauDB 0.185 ms

At 1M rows plateauDB is 88× faster than the browser's built-in IndexedDB, and its line barely moves. That flat line is the name.

88×
faster filtered queries
16.3 ms → 0.185 ms · WebKit 64×
9.1×
faster saves
85.3 ms → 9.35 ms · WebKit 29×
26×
faster imports
45.3 s → 1.75 s · WebKit 23×
4.8×
faster lookups by id
8.92 ms → 1.85 ms · WebKit 7×

Against the browser's built-in IndexedDB at 1M rows in Chromium 158, with WebKit (Safari's engine) alongside. Medians of 20 runs on an Apple M5 Max.

Use cases

For apps that keep a lot of data in the browser

IndexedDB is fine at a few thousand records. Past that, every filter that does not match one index walks the table row by row. plateauDB is for the apps that hit that wall.

Local-first apps

Issue trackers, CRMs and project tools that sync a whole workspace to the device and filter it as you type.

assignee = me AND label = bug AND priority ≤ 2

Offline-first apps

Mail, notes and field apps that keep working on a plane, with hundreds of thousands of records on the device.

folder = inbox ORDER BY receivedAt DESC LIMIT 50

Big client-side views

Data grids, dashboards and faceted filters over a million rows, with no round trip to a server for every click.

COUNT where team = 7 AND updatedAt > lastWeek

Moving off IndexedDB

Already on IndexedDB? Swap the factory and keep your code. Declare the fields you filter on to unlock fast queries.

const db = plateau.open("app", 1)

How it works

It does less work, so it stays flat

IndexedDB answers a filter by walking one index and checking every other field row by row. plateauDB keeps a ready-made answer for every value of every field and combines them.

01

A bitmap for every value

Each field you declare keeps a compressed set of the rows holding each value. A filter on three fields is three sets ANDed together, so the cost follows the answer, not the table.

team = 7
state = open
both
02

Reads only what it needs

Data lives in the Origin Private File System. Opening reads a small manifest; columns, indexes and rows load on first touch, within a memory budget you set.

4.7 MB read133 MB file, 1M rows
A 1M-row database answers its first query in about 5 ms.
03

Off the main thread

A Rust engine compiled to WebAssembly runs in a worker with synchronous file access. Your app calls the familiar IndexedDB API, and each transaction crosses in one message.

Your app
IndexedDB API
Worker
Rust → WASM → OPFS

Developer experience

A familiar API. One superpower.

plateauDB speaks the standard IndexedDB API, so existing code moves over unchanged. Declare the fields you filter on as columns, and query them with store.query.

  • The IndexedDB API you know: stores, indexes, cursors, transactions, events
  • Passes 84 of 85 IndexedDB conformance tests in Chromium and WebKit
  • One addition, store.query, for filters, sorting, limits and counts
  • Crash-safe commits, and a memory budget for low-end devices
  • No COOP/COEP headers needed. The worker and WASM start themselves

On npm as 0.2.0. Install with npm i plateaudb. It is pre-1.0: the API can still change, and the source is on GitHub.

import { plateau, promise } from "plateaudb";

const open = plateau.open("tracker", 1);   // same as indexedDB.open
open.onupgradeneeded = () => {
  open.result.createObjectStore("issues", {
    keyPath: "id",
    // the one addition: declare the fields you filter or sort on
    columns: {
      id:         "f64",
      teamId:     { kind: "u32", index: "bitmap" },
      stateId:    { kind: "u32", index: "bitmap" },
      assigneeId: { kind: "u32", index: "bitmap" },
      labelIds:   { kind: "u32_multi", index: "bitmap" },
      priority:   { kind: "u32", index: "bitmap" },
      updatedAt:  { kind: "f64", index: "ordered", group: "teamId" },
    },
  });
};
const db = await promise(open);

Benchmarks

Fast where IndexedDB is slow. Honest where it isn't.

A Linear-style issue tracker with teams, states, assignees, labels and priorities. Same data, same results from every engine. Pick a browser and a table size.

Filter by three fields
Issues for one assignee, with one label, up to a priority
16.3 ms
1.15 ms
0.185 ms
88×
faster than IndexedDB
Latest 50 in a view
One team's open issues, newest first
0.773 ms
0.243 ms
0.078 ms
9.9×
faster than IndexedDB
Sorted list, three filters
Team, state and priority, newest 50
3.43 ms
0.263 ms
0.085 ms
40×
faster than IndexedDB
Count recent changes
How many issues in a team changed since a date
Chromium's IndexedDB is unusually slow at counting; WebKit's gap is smaller.
48.1 ms
0.228 ms
0.030 ms
1605×
faster than IndexedDB
Load 1,000 records by id
Point reads by primary key
8.92 ms
5.76 ms
1.85 ms
4.8×
faster than IndexedDB
Save 2,000 changes
Replace 1,000 rows and delete 1,000 in one durable commit
85.3 ms
152 ms
9.35 ms
9.1×
faster than IndexedDB
Import the whole table
Insert every row into an empty store
45.3 s
14.1 s
1.75 s
26×
faster than IndexedDB
Fresh page to first result
A new page load, cached files, then the first query
The one place plateauDB is slower: a new page has to start its worker and compile WebAssembly.
3.41 ms
28.2 ms
6.29 ms
1.8×
slower than IndexedDB

Bars are to scale within each row. Times are medians of 20 runs on an Apple M5 Max, measured from the main thread, so plateauDB and SQLite include the trip to their worker.

Compare

Where it fits

The nearest options each give up one thing plateauDB aims to keep: the IndexedDB API, fast multi-field filters, or OPFS storage.

plateauDBIndexedDBDexieSQLite-WASM
Speaks the IndexedDB API
Dexie wraps IndexedDB in its own API; SQLite speaks SQL
Fast filters on any mix of fields
IndexedDB uses one index per query; Dexie can use compound indexes
Stays flat as the table grows
Stores data in OPFS
No special server headers
Several tabs at once
planned for plateauDB
Production-ready
plateauDB is an experiment

Facts about other projects come from their own documentation, read in November 2026. Dexie was not benchmarked.

Status

Early, and honest about it

  1. Engine and query plannerDone
    Bitmaps, grouped ordered indexes, lazy file reads
  2. IndexedDB-compatible APIDone
    84 of 85 conformance tests in Chromium and WebKit
  3. Crash-safe writesDone
    Updates, deletes and compaction, tested across 1,410 crash points
  4. Faster page start-upNext
    Close the gap with IndexedDB on a fresh page load
  5. Several tabsDone
    One owning worker, the other tabs routed to it
  6. Published packageDone
    plateaudb 0.2.0 on npm, MIT licensed
  7. Fallback to IndexedDBDone
    Uses the browser's own IndexedDB where OPFS, workers or WebAssembly are missing

Ten thousand rows or a million. Same speed.