Performance Benchmarks
Full test suite results at 100,000 documents — CRUD, queries, transactions, HTTP API, TCP, crash recovery, and MCP. Every number from npm test.
1-2 ms
Constant across all sizes
<1 ms
Direct file-per-doc read
<1 ms
In-memory cached result
278 tests
13 suites, all passing
Test Suite Overview
All 13 test suites at 100K documents. Each suite runs in an isolated child process.
Query Scaling (1K - 100K)
How read operations scale across dataset sizes. All timings in milliseconds.
| Dataset | Indexed | Doc ID | $gt | $gte/$lte | $in (5) | $in (50) | Limit 5 | Regex | Sort | Full Scan |
|---|---|---|---|---|---|---|---|---|---|---|
| 1K docs | 1 ms | <1 ms | 61 ms | 50 ms | 41 ms | 76 ms | 73 ms | 79 ms | 57 ms | 72 ms |
| 5K docs | 2 ms | <1 ms | 97 ms | 89 ms | 55 ms | 235 ms | 173 ms | 229 ms | 105 ms | 241 ms |
| 10K docs | 1 ms | 1 ms | 174 ms | 111 ms | 85 ms | 455 ms | 267 ms | 466 ms | 171 ms | 333 ms |
| 50K docs | 2 ms | 1 ms | 657 ms | 631 ms | 251 ms | 1,278 ms | 1,111 ms | 1,150 ms | 760 ms | 1,050 ms |
| 100K docs | 1 ms | 1 ms | 1,123 ms | 807 ms | 533 ms | 2,047 ms | 1,709 ms | 1,959 ms | 1,217 ms | 1,781 ms |
Scaling Behavior
How each query operation scales from 1K to 100K documents.
Operation Breakdown
Individual operation timings from every test suite at 100K documents.
CRUD Operations
Transactions (ACID)
HTTP API Endpoints
TCP / AxioDBCloud
Crash Recovery
MCP Server (AI)
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 72 ms at 1K to 1,781 ms at 100K — linear scaling expected for file-per-document scans.
$in uses Set O(1) lookup
Set-optimized $in at 100K: 2,047 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.
