Skip to main content

KeraDB vs SQLite Benchmark (v0.1.0)

· 3 min read
KeraDB Team
Core Team

This post summarizes the results of our v0.1.0 benchmark comparison between KeraDB, an embedded NoSQL + vector search database, and SQLite, the widely used embedded relational engine.
The goal is to highlight the strengths of each system and provide transparency on where KeraDB excels today—and where we plan to optimize next.

All results are taken from our Criterion.rs benchmark suite.


Quick Comparison

CategoryWinnerNotes
Single InsertKeraDB (~240× faster)No SQL parsing; native document write path
Point QueryKeraDB (~5× faster)Hash-based lookup; no query parser
Complex JSON InsertKeraDB (~124× faster)Efficient binary document storage
Mixed Read/Write (80/20)KeraDB (~63× faster)Optimized for interactive workloads
Delete (100 docs)KeraDB (2× faster)Low overhead for small batches
Bulk Inserts (5,000 docs)SQLite (~4× faster)Transaction batching efficiency
Range QueriesSQLite (7–39× faster)Optimized B-tree sequential scanning
Storage ThroughputSQLite (~10× faster)WAL + batched disk sync advantages

Key Metrics

Single Document Insert

DatabaseMean Time
KeraDB33.7 µs
SQLite8.19 ms

Complex JSON Insert

DatabaseMean Time
KeraDB35.6 µs
SQLite4.40 ms

Point Query (Lookup by ID)

DatabaseMean Time
KeraDB22.9 µs
SQLite115 µs

Mixed Read/Write (80/20 Workload)

DatabaseMean Time per Op
KeraDB14.5 µs
SQLite916 µs

Range Queries

LimitKeraDBSQLite
10 docs834 µs111 µs
100 docs3.53 ms164 µs
1000 docs27.6 ms714 µs

Bulk Insert (5,000 docs)

DatabaseTime
KeraDB153 ms
SQLite (Transaction)37 ms

Storage Throughput (5,000 docs + sync)

DatabaseThroughput
KeraDB25.8K docs/sec
SQLite255K docs/sec

Interpretation

Where KeraDB Excels

KeraDB consistently dominates in low-latency, document-centric operations:

  • Very fast single inserts and point queries
  • High performance for nested/complex JSON
  • Excellent under mixed read/write workloads
  • Strong small-batch deletion performance
  • Zero configuration and native document formats

These characteristics make KeraDB ideal for:

  • Local-first applications
  • Edge/agent workflows
  • AI pipelines and LLM tooling
  • Apps working heavily with JSON documents
  • Workloads needing predictable sub-100µs response times

Where SQLite Excels

SQLite remains exceptional for relational batch operations and large sequential scans:

  • Bulk inserts scale extremely well with transactions
  • Range queries are significantly faster
  • Write-ahead logging provides strong bulk throughput
  • SQL-based analytics remain unmatched

SQLite is still the better fit for:

  • Analytical queries
  • High-volume batch ingestion
  • Heavy use of LIMIT/OFFSET style iteration
  • Relational schemas and SQL flexibility

What’s Next for KeraDB

Based on the benchmark profile, our upcoming optimization areas include:

  • Improving range scan performance
  • Adding cursor-based iteration
  • Exploring lazy/lite document deserialization
  • Optional batched write mode
  • Reduced overhead for large result sets

These improvements will be part of our upcoming releases.


Final Thoughts

KeraDB and SQLite serve different workloads well:

  • If your application is document-first, JSON-heavy, or latency-critical → KeraDB is shaping up to be a strong choice.
  • If you need SQL, batch-heavy writes, or analytical scans → use SQLite for now.

We’ll continue publishing benchmark updates as KeraDB evolves.

If you have ideas, feedback, or would like to contribute, feel free to open a discussion or issue in our GitHub repo.