Skip to main content
Multilingual TursoDB, MVCC & AI Agent database guides Read Engine Guide →
← All Comparisons
SQLite & Edge Services · Rust vs C · Public Domain ·

TursoDB vs SQLite

Async Rust rewrite with concurrent MVCC writes and native cloud sync vs. the battle-tested C original.

Engineering Verdict

SQLite remains the gold standard for single-writer local persistence with 25+ years of hardening. TursoDB keeps the SQLite file format and SQL dialect while replacing blocking C I/O and the global write lock with async Rust, MVCC concurrent writes, built-in vector search, and first-class local-to-cloud sync.

Language
TursoDB Rust
SQLite C
Deployment
Embedded + Cloud Sync
vs Local single-file
Write Model
MVCC Concurrent Writes
vs WAL single-writer
Context & Architectural Position

TursoDB is a ground-up Rust rewrite compatible with SQLite files and SQL semantics. Rather than bolting extensions onto the C library, it re-architects I/O (io_uring), transaction concurrency (BEGIN CONCURRENT), vector indexing, and sync replication directly into the core engine.

Side-by-Side Technical Matrix

Core Engine
TursoDB
Pure Rust async engineSQLite-compatible rewrite with non-blocking io_uring I/O on Linux
SQLite
Mature C librarySynchronous blocking POSIX and Win32 file I/O
Deployment Model
TursoDB
Embedded + cloud syncIn-process library with optional sync or managed Turso Cloud
SQLite
Local file library onlyStrictly in-process; networking requires external proxies or wrappers
Concurrency & Writes
TursoDB
MVCC concurrent writesOptimistic BEGIN CONCURRENT writers without blocking active readers
SQLite
WAL single-writer lockConcurrent writers serialize or hit SQLITE_BUSY under contention
Sync & Edge Replication
TursoDB
Native bidirectional syncBuilt-in local-to-cloud sync and embedded read replicas
SQLite
No built-in syncRelies on Litestream, LiteFS, or custom external replication
Multi-Tenant Isolation
TursoDB
Native database-per-tenantLow idle overhead locally and across managed Turso Cloud
SQLite
Local files onlyPer-tenant files work locally, but routing and backups are DIY
Vector & AI Search
TursoDB
Built-in DiskANN vectorsNative vector types and ANN similarity search included
SQLite
Extension-only vectorsNo built-in index; requires external extensions like sqlite-vec
SQL Dialect & Ecosystem
TursoDB
SQLite-compatible polyglot SDKsStandard file format with Rust, JS/TS, Python, Go, C, and WASM
SQLite
Universal reference SQLiteUbiquitous dialect supported by virtually every language and OS
License
TursoDB
MIT permissive licenseOpen-source core free for commercial embedding and self-hosting
SQLite
Public Domain dedicationFree to embed anywhere with optional paid commercial warranty

Verified Real-Hardware Benchmarks

VERIFIED RUN
Intel(R) Xeon(R) E-2288G CPU @ 3.70GHz (8c) · kvm / Linux 6.8.0 · io_uring ENABLED · Turso 0.8.4 · 2026-12-05

Concurrent Read-Compute(2ms)-Write TX @ 16w (bun 1.4.5)

Higher is better · tx/s
TursoDB BEGIN CONCURRENT · 16w (p99 44.894ms · retries 0%) 1,795 tx/s
bun:sqlite (WAL FULL) BEGIN IMMEDIATE · 16w (p99 933.177ms · busy 170) 261.6 tx/s

Durable Append Throughput — Verified FULL Sync (bun 1.4.5)

Higher is better · ops/s
TursoDB MVCC · 1w (bun 1.4.5) (sync=2 · retries 0%) 2,853 ops/s
bun:sqlite (WAL FULL) · 1w (sync=2 · busy 0) 2,463 ops/s
TursoDB MVCC · 4w (bun 1.4.5) (sync=2 · retries 0%) 2,700 ops/s
bun:sqlite (WAL FULL) · 4w (sync=2 · busy 14) 2,141 ops/s
TursoDB MVCC · 8w (bun 1.4.5) (sync=2 · retries 0%) 2,793 ops/s
bun:sqlite (WAL FULL) · 8w (sync=2 · busy 26) 2,431 ops/s
TursoDB MVCC · 16w (bun 1.4.5) (sync=2 · retries 0%) 2,399 ops/s
bun:sqlite (WAL FULL) · 16w (sync=2 · busy 89) 1,464 ops/s

Full-Table Decrypt Scan Latency (50,000 rows · fresh open median)

Lower is better · ms
TursoDB Plaintext (full-table decrypt scan) (Baseline (unencrypted)) 14.0 ms
TursoDB AEGIS-256 (full-table decrypt scan) (+42.9% vs Plaintext) 20.0 ms
TursoDB AES-256-GCM (full-table decrypt scan) (+135.7% vs Plaintext) 33.0 ms

Native Primary-Key Point Lookup p99 (2,000 verified queries · Prepared)

Lower is better · ms
TursoDB 0.8.4 Point Lookup p99 (p50 0.0014ms) 0.0017 ms
C SQLite 3.54.1 Point Lookup p99 (p50 0.0012ms) 0.0014 ms
Stoolap 0.5.1 Point Lookup p99 (p50 0.0004ms) 0.0008 ms
Engineering Takeaways
  • Under 16-worker Read-Compute(2ms)-Write transactions (verified PRAGMA synchronous=FULL on both engines), TursoDB BEGIN CONCURRENT reached 1,794.6 tx/s (p99 44.9 ms, 0% retries) vs bun:sqlite BEGIN IMMEDIATE at 261.6 tx/s (p99 933.2 ms)—6.9× higher throughput and 20.8× lower tail latency (5.0× on Node.js).
  • Under equal FULL-fsync concurrent appends with hoisted prepared statements, TursoDB MVCC outperformed SQLite WAL across 1/4/8/16 workers (at 16w: 2,399 vs 1,464 ops/s on Bun, 2,406 vs 1,403 ops/s on Node.js) with 5.0×–5.5× lower p99 latency.
  • With zero JS/FFI overhead in native Rust (--release), TursoDB 0.8.4 matched C SQLite 3.54.1 within 0.3 µs on verified PK point lookups (0.0017 ms vs 0.0014 ms p99), while C SQLite remained faster on single-thread 50k batch inserts (2.76M vs 696k rows/s).
  • On Xeon AES-NI hardware (~21.8 MB DB), native AEGIS-256 decrypted full-table scans 1.65× faster than AES-256-GCM (20 ms vs 33 ms; plaintext 14 ms) with zero plaintext leakage on disk and 100% keyless open rejection.
Reproduce: bash benchmarks/run-suite.sh --only e1,e4,e7 --runtime all View full 8-scenario Real-Hardware Benchmarks Hub →

How to Choose

Choose TursoDB when
  • Your workload hits SQLITE_BUSY under concurrent writes and needs optimistic MVCC (BEGIN CONCURRENT).
  • You want built-in local-to-cloud sync or embedded replicas without operating separate replication daemons.
  • You are building AI agents or RAG apps that need native vector search alongside relational state in one file.
  • You want memory-safe Rust internals and non-blocking async I/O that integrates cleanly with modern runtimes.
Choose SQLite
  • You need 25+ years of production hardening, formal test-suite guarantees, and zero risk of edge-case SQL divergence.
  • Your application is strictly local with low write concurrency where single-writer WAL is already more than fast enough.
  • You depend on niche C-API SQLite extensions, custom virtual tables, or system-preinstalled libsqlite3 binaries.
  • You require public-domain licensing with minimal binary footprint (~1 MB) on constrained embedded hardware.

Architectural Deep Dive

01

Breaking the Single-Writer Ceiling with Async Rust

Classic SQLite serializes all write transactions behind a single file lock—even in WAL mode—and blocks calling threads during disk flushes. TursoDB replaces that path with an asynchronous I/O engine (supporting io_uring on Linux) and MVCC page versioning, allowing non-conflicting transactions started with BEGIN CONCURRENT to commit concurrently without stalling event loops.

02

File Compatibility vs. Built-In Cloud Mechanics

Because TursoDB targets the standard SQLite file format and SQL grammar, teams can adopt it incrementally without rewriting schemas or ORMs. The difference appears once data leaves one machine: SQLite leaves backup streaming, edge reads, and offline conflict sync to external tooling, whereas TursoDB builds pull/push synchronization directly into its client SDKs.

Code Comparison

TursoDB (Async Rust / Concurrent MVCC)
import { connect } from '@tursodatabase/database';

const db = await connect('agent.db');
await db.exec('BEGIN CONCURRENT');
await db.prepare('INSERT INTO events (kind, payload) VALUES (?, ?)').run('sync', '{}');
await db.exec('COMMIT');
SQLite (C / Single-Writer WAL)
import Database from 'better-sqlite3';

const db = new Database('local.db');
db.pragma('journal_mode = WAL');
const stmt = db.prepare('INSERT INTO events (kind, payload) VALUES (?, ?)');
stmt.run('local', '{}');

Developer FAQ

Can TursoDB open existing SQLite .db files?

Yes. TursoDB is designed for binary file-format and SQL compatibility with SQLite, so existing local SQLite databases can be read and migrated with standard tools and drivers.

Does TursoDB require Turso Cloud, or can it run purely locally like SQLite?

It runs purely locally with zero network dependencies. Cloud sync and embedded replicas are strictly opt-in when you need remote durability or multi-device distribution.

When is standard SQLite still the better choice?

For single-writer local apps, CLI tools, or environments requiring legacy C extensions and decades-old ABI stability, upstream SQLite remains simpler and more battle-tested.

Test TursoDB in Your Own Stack

Open a local SQLite-compatible file in Rust, TypeScript, Python, or Go—then attach cloud sync when you need multi-region replication.

Related Comparisons

Search
Press Esc to close · Powered by Pagefind