Benchmarked14/14 Passing

Performance Benchmarks

Full test suite results at 100,000 documents — CRUD, queries, transactions, HTTP API, TCP, crash recovery, and MCP. Every number from npm run node-test.

AMD Ryzen 5 5500U6C / 12T @ 2.1 GHz7.6 GB DDR4Ubuntu Linux 7.0.0Node v26.8.1November 3, 2026
Indexed Query

1-2 ms

Constant across all sizes

Doc ID Lookup

<1 ms

Direct file-per-doc read

Cache Hit

<1 ms

In-memory cached result

Test Coverage

330 tests

14 suites, all passing

Query Scaling (1K - 100K)

How read operations scale across dataset sizes. All timings in milliseconds.

DatasetIndexedDoc ID$gt$gte/$lte$in (5)$in (50)Limit 5RegexSortFull Scan
1K docs1 ms<1 ms12 ms8 ms5 ms45 ms38 ms32 ms18 ms36 ms
5K docs1 ms<1 ms35 ms22 ms12 ms140 ms115 ms98 ms52 ms110 ms
10K docs1 ms1 ms68 ms45 ms22 ms255 ms210 ms185 ms98 ms215 ms
50K docs1 ms1 ms260 ms152 ms70 ms960 ms745 ms680 ms350 ms780 ms
100K docs1 ms1 ms494 ms286 ms125 ms1,805 ms1,339 ms1,215 ms652 ms1,365 ms
Speed:Lightning (≤2 ms)Fast (≤100 ms)Moderate (≤300 ms)Slow (≤1 s)Heavy (>1 s)

Scaling Behavior

How each query operation scales from 1K to 100K documents.

IndexedExact match on indexed field
1K
1 ms
5K
1 ms
10K
1 ms
50K
1 ms
100K
1 ms
Doc IDDirect documentId lookup
1K
<1 ms
5K
<1 ms
10K
1 ms
50K
1 ms
100K
1 ms
$gtGreater-than range scan
1K
12 ms
5K
35 ms
10K
68 ms
50K
260 ms
100K
494 ms
$gte/$lteCombined range boundary
1K
8 ms
5K
22 ms
10K
45 ms
50K
152 ms
100K
286 ms
$in (5)In-operator, 5 values
1K
5 ms
5K
12 ms
10K
22 ms
50K
70 ms
100K
125 ms
$in (50)In-operator, 50 values
1K
45 ms
5K
140 ms
10K
255 ms
50K
960 ms
100K
1,805 ms
Limit 5Small limit query
1K
38 ms
5K
115 ms
10K
210 ms
50K
745 ms
100K
1,339 ms
RegexPattern matching
1K
32 ms
5K
98 ms
10K
185 ms
50K
680 ms
100K
1,215 ms
SortSorted range query
1K
18 ms
5K
52 ms
10K
98 ms
50K
350 ms
100K
652 ms
Full ScanCollection scan (10K cap)
1K
36 ms
5K
110 ms
10K
215 ms
50K
780 ms
100K
1,365 ms

Key Takeaways

Indexed = O(1) constant time

Indexed and documentId lookups stay at 1-2 ms whether the collection has 1K or 100K docs. Each lookup reads exactly one file from disk.

ACID transactions stay fast

Single-operation transactions (insert/update/delete + commit) complete in 32-44 ms. Rollback is just 8 ms.

HTTP API is lightweight

CRUD via HTTP endpoints adds minimal overhead — insert is 35 ms, read by ID is 3 ms, query is 12 ms.

Cache eliminates repeat reads

First query hits disk; subsequent identical queries return from InMemoryCache in under 1 ms. Random TTL between 5-15 minutes.

TCP with connection pooling

10-connection pool initializes in 184 ms. TLS CRUD adds encryption overhead but stays under 100 ms per operation.

Crash-safe recovery

SIGKILL during rapid writes recovers cleanly — no corrupted documents. Recovery scans WAL + registry in ~2 seconds.

Full scan scales linearly

From 36 ms at 1K to 1,365 ms at 100K — linear scaling expected for file-per-document scans.

$in uses Set O(1) lookup

Set-optimized $in at 100K: 1,805 ms for 50 values. The value array is converted to a Set for constant-time checks.

MCP for AI agents

Full MCP server handles DB/collection/document/transaction/user/role operations. Functional tests complete in 1.7 seconds.

Reproducible Benchmark Suite

Run the Benchmark Suite on Your Machine

Verify throughput, sub-millisecond latencies, and ACID rollback integrity on your own hardware with a single command. Zero manual database setup required.

1-Command Quickstart

bash
1git clone https://github.com/nexoral/AxioDB.git
2cd AxioDB
3npm install
4npm run benchmark

Automated pre-check: If compiled files in lib/ are missing, it runs npm run build first. Automatically removes all temporary benchmark data on completion.

Default Benchmark Profile

  • • 15,000 Documents inserted in 3,000 document batches
  • • Indexed Point Reads: 500 queries reporting Min, p25, p50, p75, p90, p95, p99
  • • Unindexed Full Scans: 25 queries testing full collection traversal
  • • Index Advantage: Live calculation of indexed speedup multiplier

Engine Verification Checks

  • • Updates & Deletions: Indexed vs unindexed UpdateOne and deleteOne
  • • InMemoryCache: Cold read vs 100 warm queries (~50x+ acceleration)
  • • ACID Rollback: 1,000 writes staged then rolled back (0 leaked records)
  • • Storage Footprint: On-disk size vs SQLite, LowDB, and raw JSON

Available CLI Arguments & Flags

FlagTypeDefaultDescription
--docs=Nnumber15000Total documents to insert and index (e.g. 5000, 50000, 100000, 500000)
--batch=Nnumber3000Chunk size per insertMany batch to keep memory lean
--queries=Nnumber500Number of random indexed lookups to test for percentiles
--unindexed=Nnumber25Number of unindexed full-scan lookups/updates/deletes to sample
--keepbooleanfalsePreserves test database files on disk for inspection instead of auto-cleaning

Ready-to-Copy Command Combinations

1. Quick Smoke Test (5,000 docs — fast ~2s run):

bash
1npm run benchmark -- --docs=5000 --batch=1000 --queries=100 --unindexed=10

2. High-Volume Stress Test (100,000 docs):

bash
1npm run benchmark -- --docs=100000 --batch=10000 --queries=1000

3. Maximum Capacity Scale Test (500,000 docs):

bash
1npm run benchmark -- --docs=500000 --batch=10000 --queries=1000 --unindexed=15

4. Inspect Physical Files and Index JSONL on Disk (--keep):

bash
1npm run benchmark -- --docs=15000 --keep
2ls -lh benchmark/Benchmark_TempData/BenchmarkDB/BenchDB/Users
3ls -lh benchmark/Benchmark_TempData/BenchmarkDB/BenchDB/Users/indexes

Methodology

Each dataset size runs the full npm run node-test suite — 14 test suites in isolated child processes
Timings captured from real test output logs — end-to-end execution including index lookup, file I/O, and filtering
Data generated with fixtures.generateUsers(N) — names, emails, ages (20-69 cycling), consistent across all sizes
Indexes created on name, email, and age fields before dataset insertion
File-per-document storage with JSONL registries, dual-write indexes, and random TTL cache (5-15 min)
No warm-up runs discarded — first-run timings included, reflecting real cold-start behavior

See also: Comparison · Features