DuckDB vs SQLite

DuckDB: Local analytics, data exploration and lightweight data pipelines.; SQLite: Embedded apps, local-first tools, tests and small-to-medium web apps.

FieldDuckDBSQLite
PricingOpen sourceOpen source
Open sourceYesYes
Self-hostableYesYes
EcosystemPython, JavaScript / TypeScript, Language-agnosticLanguage-agnostic
LicenseMITPublic domain
CategoryDatabases & ORMsDatabases & ORMs

DuckDB

An in-process analytical SQL database that queries Parquet, CSV and JSON files directly and fast.

Choose DuckDB if

Local analytics, data exploration and lightweight data pipelines.

Why it’s here

DuckDB is an analytical SQL database that can run inside the application process. In Python it can query Pandas and Polars DataFrames and Arrow tables, so a script can join or aggregate data it has already loaded (Python documentation). You can use an in-memory connection for an exploratory session or open a database file to preserve tables between runs (Python connection options).

Pick it when

  • Your inputs are Parquet files and you want to query them in place. DuckDB can scan a file, a list of files or a glob. Its Parquet reader can limit the scan to the columns the query needs and use filters and file statistics to skip parts of the input (Parquet documentation).
  • You need to join or aggregate data that exceeds available RAM. DuckDB can spill intermediate data to a temporary directory, and the temp_directory setting lets you choose the disk that holds those files (workload tuning guide).
  • You want a Python notebook to query an existing DataFrame without loading its rows into a separate database. The Python interface exposes those objects to SQL, and it can return results as DataFrames or Arrow objects (Python documentation).

Skip it when

  • Several processes must directly write to the same native database file. Embedded read-write mode assigns that job to one process, which can run multiple writer threads. DuckDB documents its Quack remote protocol for a client-server deployment with writers in multiple processes (concurrency documentation).

Current state

DuckDB 2.0.1 was released on 2026-11-20 and fixes issues found after 2.0.0 (release notes, release announcement). The source is distributed under the MIT licence (licence).

Setup

Install the Python package with pip install duckdb, then try duckdb.sql("SELECT 42").show() after importing it. To persist tables, use duckdb.connect("analysis.duckdb") and query through that connection (Python documentation).

Watch out for

Concurrent transactions that edit the same rows can hit an optimistic concurrency conflict, so a writer may need to retry (concurrency documentation). Spilling supports larger-than-memory workloads, but a query with several blocking operators, such as an aggregate combined with a sort, can still exhaust memory (workload tuning guide).

DuckDB on GitHub

SQLite

A small, fast, self-contained SQL database engine that stores a whole database in a single file.

Choose SQLite if

Embedded apps, local-first tools, tests and small-to-medium web apps.

Why it’s here

SQLite is a SQL engine that runs as a library inside an application. The application reads and writes the database file directly, and a complete database can live in one cross-platform disk file (About SQLite). The upstream guide describes using it as a document format, as local storage for software on a device and as the backing database for many websites (When to use SQLite).

Pick it when

  • You are storing application data on the same device as the program. SQLite needs no database server or separate configuration, so the application can open its own file and use SQL transactions directly through the library (About SQLite).
  • A tool needs one file for related structured records and wants to read or update just the tables and rows involved in an operation. SQLite documents that design as an application file format (When to use SQLite).
  • A local database needs to serve readers during a write transaction. Write-ahead logging lets reads continue while a writer appends changes to the log (WAL documentation).

Skip it when

  • Several machines must access the same database over a network filesystem. SQLite recommends a client-server database for this arrangement, and write-ahead logging requires the participating processes to run on the same host (When to use SQLite, WAL documentation).
  • Your workload needs many simultaneous writers to the same database. SQLite permits one writer per database file at a time, so the other writes must wait (When to use SQLite).

Current state

SQLite 3.54.1 was released on 2026-10-16 (release history). The SQLite project has dedicated its source code to the public domain (copyright and public-domain dedication).

Setup

Download the command-line tools for your platform, then run sqlite3 app.db to open the file or create it if it does not exist. Commands such as .tables let you inspect the open database from the shell (downloads, command-line shell).

Watch out for

In write-ahead logging mode, overlapping readers can prevent a checkpoint from completing and let the log file grow (WAL documentation). SQLite ties a value's type to the value itself by default. Use STRICT tables where you need a column to enforce its declared type (datatype documentation).