Benchmarks

1M documents (employee-shaped, ~500B each). Docker-Compose, in-network runner (container-to-container — no port-forward artifact). AMD EPYC-Genoa, 4 vCPU, 8 GiB RAM. Source: tests/comparison-mongodb/.

OxiDB vs MongoDB 7 (1M docs)

OxiDB 24 — MongoDB 0

Across the full 24-test suite at 1M documents, OxiDB wins every measured workload. Largest wins are on counts (index-only path) and aggregation; smallest wins are insert (1.1×) and bulk full scans (1.1–1.3×).

OperationOxiDBMongoDBWinner
Count all (1M docs)200µs429msOxiDB 2189×
Top 5 cities (aggregation)1ms822msOxiDB 1262×
Count age ≥ 50200µs156msOxiDB 645×
Count dept=Engineering300µs53msOxiDB 197×
Compound (composite idx) dept+status161ms626msOxiDB 4.1×
Random seq lookup × 100K8.07s27.6sOxiDB 3.4×
Indexed: salary 80K-120K (235K results)1.01s3.25sOxiDB 3.2×
Indexed: city=Tokyo (100K results)448ms1.37sOxiDB 3.0×
Indexed: age ≥ 60 (300K results)1.43s4.12sOxiDB 2.9×
Indexed: dept=Engineering (199K results)1.17s2.65sOxiDB 2.3×
Create 4 indexes on 1M docs2.82s7.33sOxiDB 2.6×
Bulk delete (10% of corpus)5.88s13.3sOxiDB 2.3×
$or city=Tokyo OR Paris (no idx)1.48s3.15sOxiDB 2.1×
Compound full scan (no idx)515ms1.03sOxiDB 2.0×
$in country (no idx)2.21s4.03sOxiDB 1.8×
Range (salary 50K-100K) no idx2.06s3.95sOxiDB 1.9×
Exact match dept=Engineering (no idx)2.18s2.95sOxiDB 1.4×
Match + Group (aggregation)247ms336msOxiDB 1.4×
Nested address.zip range (dot-path)1.47s1.91sOxiDB 1.3×
Range query × 10K (10.2M rows total)30.2s35.9sOxiDB 1.2×
Bulk insert 1M docs (batch 1000)16.0s18.3sOxiDB 1.1×

Resource footprint (post-bench, 1M docs)

ResourceOxiDBMongoDBNote
Memory (RSS)1.71 GiB1.00 GiBOxiDB caches are env-tunable (OXIDB_DOC_CACHE_SIZE, OXIDB_DOC_BYTES_CACHE_SIZE); MongoDB WT cache capped at 0.5 GiB.
Disk (data dir)741 MB626 MBOxiDB stores JSONB; MongoDB stores compressed WiredTiger. ~18% larger on disk.

Methodology

  • Apples-to-apples networking. The Go bench runner runs as a container on the same Docker network as the engines (BENCH_MODE=innetwork). Host-mode runs through Docker's port-forward add ~160µs/round-trip that distorts small-payload workloads.
  • Single cold run. Each test runs once on a freshly-inserted 1M-doc corpus. No warmup.
  • Default configurations. No tuning. OxiDB uses defaults; MongoDB uses WiredTiger with --wiredTigerCacheSizeGB 0.5 per the existing compose config.
  • Same seed. Both engines see the identical document corpus (deterministic generator, fixed RNG seed).

OxiDB vs PostgreSQL (100K docs)

OxiDB 10 — PostgreSQL 10

Tied overall at 100K docs. OxiDB wins on document queries, counts, and aggregation. PostgreSQL wins on bulk insert, indexed range queries, and JOIN-heavy workloads. (Pending re-run at 1M scale.)