Skip to main content
Multilingual TursoDB, MVCC & AI Agent database guides Read Engine Guide →
← All Comparisons
Browser WASM & Embedded OLAP · Rust vs C++ · MIT ·

TursoDB vs DuckDB

Row-oriented OLTP, MVCC writes, and cloud sync vs. vectorized columnar analytics over Parquet and S3.

Engineering Verdict

TursoDB and DuckDB are complementary rather than direct substitutes. Choose DuckDB for in-process analytical scans, aggregations, and direct querying over Parquet, Arrow, or S3 data lakes; choose TursoDB for transactional OLTP state, frequent point lookups/updates, concurrent writes, and local-to-cloud sync.

Language
TursoDB Rust
DuckDB C++
Deployment
Embedded + Cloud Sync
vs Embedded columnar OLAP
Write Model
MVCC Concurrent Writes
vs Batch ingest / parallel reads
Context & Architectural Position

Both TursoDB and DuckDB run embedded inside your application process with zero server daemon, which leads developers to compare them. Under the hood, they optimize for opposite access patterns: TursoDB is a row-oriented transactional SQLite-compatible engine, whereas DuckDB is a C++ vectorized columnar OLAP engine.

Side-by-Side Technical Matrix

Core Engine
TursoDB
Row-oriented Rust B-treesSQLite-compatible transactional storage with native async I/O
DuckDB
Vectorized columnar C++SIMD batch execution with columnar compression and late materialization
Deployment Model
TursoDB
Embedded + cloud syncIn-process library with optional sync and managed Turso Cloud
DuckDB
In-process analytics libraryPython, R, Node, Rust, Go, C++, CLI, and WASM over files/S3
Concurrency & Writes
TursoDB
High-frequency OLTP MVCCFrequent point inserts/updates via BEGIN CONCURRENT concurrent writes
DuckDB
Bulk append optimizedBuilt for batch loads and scans, not high-frequency multi-writer OLTP
Sync & Edge Replication
TursoDB
Native bidirectional syncBuilt-in local-to-cloud sync and embedded read replicas
DuckDB
No built-in OLTP syncCloud workflows use MotherDuck or shared Parquet on S3/Iceberg
Multi-Tenant Isolation
TursoDB
Per-tenant OLTP scaleLightweight isolated databases locally and across Turso Cloud
DuckDB
Per-job analytical filesSingle-writer file locking limits multi-process OLTP tenant workloads
Vector & AI Search
TursoDB
Built-in DiskANN vectorsOperational vector columns for RAG and AI agent memory
DuckDB
VSS / HNSW extensionFixed-size arrays and HNSW aimed at analytical similarity workloads
SQL Dialect & Ecosystem
TursoDB
SQLite CRUD dialectStandard application ORM and transactional query ecosystem
DuckDB
Analytical SQL + lake formatsNative Parquet, CSV, JSON, Arrow, Iceberg, and S3/HTTPFS readers
License
TursoDB
MIT permissive licenseOpen-source core with no copyleft restrictions
DuckDB
MIT permissive licenseOpen-source C++ core freely embeddable in commercial tools

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

OLTP Single-Row Point Writes (Prepared · 5000 tx · bun 1.4.5)

Higher is better · ops/s
TursoDB Row OLTP (bun 1.4.5) 2,519 ops/s
DuckDB Columnar (Prepared) 1,174 ops/s

OLAP GROUP BY Aggregation (100,000 rows · median · bun 1.4.5)

Lower is better · ms
TursoDB OLAP GROUP BY (100,000 rows) 33.2 ms
DuckDB Native Columnar (100,000 rows) 3.80 ms
DuckDB ATTACH → TursoDB .db (zero-copy) (Verified 100,000 rows) 20.2 ms
Engineering Takeaways
  • With hoisted prepared statements on BOTH engines, TursoDB outperformed DuckDB by 2.15× on 5,000 single-row OLTP commits (2,519 vs 1,174 ops/s on Bun; 2,324 vs 1,191 ops/s on Node.js), while DuckDB columnar led by 8.7× on 100k-row OLAP GROUP BY (3.80 ms vs 33.17 ms, 5-run median).
  • Hybrid zero-ETL architecture verified: after WAL checkpoint, DuckDB directly ATTACHed the TursoDB .db file (100,000 rows verified) and completed the OLAP aggregation in 20.24 ms median—1.64× faster than row-store scan without copying data.
Reproduce: bash benchmarks/run-suite.sh --only e6 --runtime all View full 8-scenario Real-Hardware Benchmarks Hub →

How to Choose

Choose TursoDB when
  • Your app performs frequent point lookups, row updates, user sessions, or transactional writes (OLTP).
  • You need local-to-cloud sync, embedded read replicas, or managed multi-tenant database orchestration.
  • You are building AI agents or SaaS apps storing operational state and vector embeddings in one file.
  • You want SQLite file-format compatibility with low memory overhead per open database.
Choose DuckDB
  • You need fast aggregations, window functions, and multi-million-row scans over wide analytical datasets.
  • You want to query Parquet, CSV, Apache Arrow, Iceberg, or S3 buckets directly with zero ETL.
  • You are building data-science pipelines, BI dashboards, or local ETL scripts in Python, R, or Node.
  • Your workload is read-heavy or batch-append rather than high-frequency single-row mutations.

Architectural Deep Dive

01

Row-Oriented B-Trees vs. Vectorized Columnar Storage

TursoDB stores complete rows on B-tree pages so fetching or updating a single user record touches only a handful of kilobytes, keeping latency in the microsecond range. DuckDB compresses values column-by-column into row groups and processes thousands of values per CPU vector batch—delivering orders-of-magnitude faster GROUP BY and SUM queries while making tiny single-row updates expensive.

02

Using Both Together in One Architecture

Because both engines are MIT-licensed and run in-process, many teams pair them cleanly instead of forcing one to do both jobs. TursoDB handles operational application state, per-tenant writes, and cloud sync, while DuckDB attaches directly to exported snapshots or Parquet logs to run heavy analytical reporting.

Code Comparison

TursoDB (Row-Oriented OLTP + Sync)
import { connect } from '@tursodatabase/database';

const db = await connect('./orders.db');
await db
  .prepare('INSERT INTO orders (id, user_id, total_cents) VALUES (?, ?, ?)')
  .run('ord_901', 'usr_42', 4900);
DuckDB (Columnar OLAP / Parquet)
import { DuckDBInstance } from '@duckdb/node-api';

const instance = await DuckDBInstance.create(':memory:');
const conn = await instance.connect();
const reader = await conn.runAndReadAll(
  "SELECT region, SUM(revenue) FROM 's3://bucket/sales/*.parquet' GROUP BY region",
);

Developer FAQ

Can DuckDB query SQLite or TursoDB files directly?

Yes. DuckDB ships a built-in SQLite scanner extension that can read standard SQLite-format .db files directly for ad-hoc analytical queries.

Why shouldn’t I use DuckDB for a standard CRUD web backend?

DuckDB’s columnar row-group format and single-process write model are optimized for bulk scans and batch loads, not thousands of tiny concurrent INSERT/UPDATE transactions or multi-device cloud sync.

Is TursoDB good for analytics over 100 GB Parquet files?

No. For multi-gigabyte analytical scans over Parquet or S3 object storage, DuckDB’s vectorized columnar engine is vastly faster and purpose-built for the task.

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