Write to us

Engineering

Our own database, six weeks in

In six weeks NexaDB, our own database, went from a first test to running a whole Nexapad test company. Its pages beat PostgreSQL. Loading and search did not.

NexaDB is the database we wrote ourselves, in Rust, with nothing but Rust’s own standard library. It keeps a company’s data in one file on the server, right next to the app. Six weeks ago it read its first copy of Nexapad’s data. Today all of Nexapad runs on it, in a test company on our own server.

Six weeks

  • 6 October 2026. NexaDB reads its first copy of Nexapad’s data.
  • 11 October 2026. Backups, upgrades, and names sorted the Danish way.
  • 25 October 2026. Version 1.0, with a file format we promise to keep.
  • 2 November 2026. Nexapad starts to move over, one part at a time.
  • 11 November 2026. A Nexapad server runs with no PostgreSQL at all.
  • 14 November 2026. Version 1.2. Every save pays for the memory it uses.
  • 17 November 2026. The first race against PostgreSQL, with the whole Nexapad server.

Safe first

A database has one job above all others: never lose what it said it saved. Before a release, NexaDB has to pass these.

  • 30,000 simulated crashes while it writes. Nothing lost, nothing wrong.
  • 161,976 simulated power cuts while it upgrades its file, changes how it saves, grows and makes backups. Nothing lost.
  • 600 real power cuts of a virtual machine while it wrote. 28,055 saves checked, none lost.
  • 163 parts of its code proved correct by Phage, our code prover.

Not tested yet: pulling the power of a real machine. That waits for a switch we can turn off from afar.

Fast where it counts

Reading is most of what an app does. In a test of NexaDB’s storage core alone, a plain lookup is about as fast as SQLite. A page from the middle of a long list, or a count of everything, is at least 200 times faster than both, because NexaDB keeps those numbers ready instead of walking through the rows.

ReadNexaDBSQLitePostgreSQL
Find one row3.673.4745
50 rows in order11.11591
50 rows from the middle of a long list15.24,53213,639
Count every row0.429313,743

NexaDB’s storage core alone, without its SQL layer, with every page in memory. Microseconds, the middle value of 2,000 lookups and short ranges, 400 pages and 200 counts, over 325,000 rows. One desktop computer, 5 October 2026. PostgreSQL’s times include the trip to its server, as an app sees it. Lower is better. The fastest in violet.

Saving is faster too. A typical save is 1.6 to 2 times quicker than on PostgreSQL.

SaveNexaDBPostgreSQL
One save2.043.36
100 rows in one save14.930.9
Eight people saving at once4.699.05

Milliseconds, the middle of three runs, every save safe on disk before it is confirmed. A desktop SSD, 325,000 rows, 24 October 2026. One single save in a hundred took longer than 16.3 ms on NexaDB, against 8.9 ms on PostgreSQL.

The whole server, 10,000 people

Numbers from a test bench are one thing. So we ran the whole of Nexapad on both.

  • Nexapad with 10,000 people and a month of their hours: 300,000 work days.
  • The same Nexapad server both times, set to use one database or the other.
  • Our ARM server. Nexapad got 2 CPU cores and 1 GiB of memory. PostgreSQL got 2 more cores and 3 GiB of its own.
  • Three rounds each, taking turns, after a check that both gave the same data in 53 sample requests.
  • Known differences: NexaDB sorts names the Danish way, so a page of a long list can hold other people, and one report page counts its events differently, so it was left out.
TestNexaDBPostgreSQL
Pages, 50 a second: 95% answered within81 ms275 ms
Pages, 100 a second: answered100 a second60 a second
Pages, 100 a second: 95% answered within0.24 s6.8 s
Pages, 25 a second: 95% of searches answered within87 ms25 ms
Pages and saves (1 in 5), 100 a second: answered93 a second68 a second
Pages and saves (1 in 5), 100 a second: failed0%12.5%
Size on disk after loading465 MiB768 MiB

The middle of three rounds each, measured 17 November 2026. PostgreSQL’s first round overlapped a program build on the same server; its other two show the same picture. PostgreSQL’s size includes its own system files. The search row uses PostgreSQL’s two later rounds. The better result in violet.

At 50 pages a second both keep up, but NexaDB answers more than three times sooner. At 100 a second PostgreSQL falls behind and pages wait for seconds, while NexaDB answers 95 of every 100 within a quarter of a second. Part of that speed comes from how Nexapad uses each database: on NexaDB it keeps its statistics counted as it saves, where on PostgreSQL it adds them up for each page. NexaDB has a limit too. Above about 105 pages a second its waits grow to three seconds. At 200 requests a second, 1 in 5 of them a save, both fail about one request in seven.

Where it is not there yet

Search is slower. As the table shows, NexaDB takes about three and a half times as long to answer a search as PostgreSQL. We are looking into why.

Loading lots of data is slow. Putting 10,000 people with a month of hours into NexaDB took 623 seconds. PostgreSQL did it in 68. In one extra run, saving 16 people at a time took about as long as saving thousands at a time, and the program was busy computing for 379 of its 621 seconds. So our best guess is that the time goes to NexaDB’s own work on each row, not to waiting for the disk. Finding out is the next job.

Both have to get faster before a big company can move over. We will prove a new way of loading correct before we trust it. Then comes the same race with 400,000 people. Until NexaDB wins that one too, Nexapad keeps running on PostgreSQL.