DuckDB
An in-process analytical SQL database: a library with no server that queries Parquet, CSV, Iceberg and S3 directly.
- What it is
- Query engines,Relational databases
- Type
- Open source
- Made by
- DuckDB Foundation and DuckLabs
- License
- MIT
- Facts checked
- 23 October 2026
What it is
DuckDB runs inside your process, the way SQLite does, but it’s built for analytics: columnar storage and a vectorised engine that works on batches of values in parallel threads, spilling to disk when a query outgrows memory. It has no external dependencies and installs as a library for Python, R, Java or Node.js, or as a single command-line binary. A database is one file, or you can skip that and query files where they are: SELECT ... FROM 's3://bucket/*.parquet'.
Extensions add formats and storage. httpfs reads and writes S3 and HTTP; iceberg reads Iceberg tables and writes them through a REST catalog; delta reads and writes Delta Lake using the Delta Kernel library; postgres queries a live PostgreSQL database; and ducklake attaches DuckLake catalogs. The current release is 2.0.0, out on 21 October 2026 and itself a long-term support release; the previous LTS line, 1.4, is supported until 17 November 2026.
Why teams pick it
- Zero setup:
pip install duckdband you have a fast columnar engine - Reads Parquet, CSV, JSON, Iceberg and Delta Lake in place, locally or on S3, reading only the columns and row groups it needs
- Larger-than-memory queries spill to disk, so one laptop or VM goes a long way
- MIT licensed, with the IP held by the non-profit DuckDB Foundation
Watch out for
- One machine only: it scales up, not out
- Only one process can write to a database file at a time; it isn’t a shared server for many users
- Iceberg writes need a REST catalog; reading a table by its path is read-only
- Built for analytics, not many small transactional writes; use PostgreSQL or SQLite for app data
Good for
- Scans and aggregations over billions of rowsColumnar storage and a vectorised engine on parallel threads, reading only the columns and row groups a query needs and spilling to disk.
- Inside the application processRuns inside your process as a library with no dependencies; a database is one file, or it queries Parquet and CSV where they are.
The DuckDB family
1 technologies built from or on DuckDB
Alternatives
What all query engines have in common →Compare side by side →
CedarDBCommercialAlso good for scans and aggregations over billions of rowsA PostgreSQL-compatible database rebuilt from scratch at TU Munich, running transactions and analytics on one copy of the data on a single server.
Apache DrillOpen sourceA distributed SQL engine, inspired by Google’s Dremel, that queries JSON, Parquet, CSV files and NoSQL stores in place without defining a schema first.DuckFlightPreviewOpen sourceA DuckDB community extension that turns a running DuckDB database into a server: PostgreSQL clients and Arrow Flight SQL clients can connect, authenticate and query the same live database.
GizmoSQLOpen sourceAlso good for scans and aggregations over billions of rowsA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.
HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.
MotherDuckCommercialAlso good for scans and aggregations over billions of rowsA serverless cloud data warehouse built on DuckDB, where one query can run partly on your laptop and partly in the cloud.
PivotOpen sourceAlso good for scans and aggregations over billions of rowsA young open-source analytics server in Rust that speaks the PostgreSQL protocol and queries Iceberg and Delta Lake tables straight from object storage.
Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.How it fits with other technologies
What DuckDB uses
- DuckDBreads and writesDuckLake
- DuckDBreads and writesApache Parquet
- DuckDBreads and writes JSON and JSON Lines asJSON
- DuckDBreads and writes tables inApache Iceberg
- DuckDBreads and writes tables inDelta Lake
- DuckDBreads, writes and searches tables inLance
- DuckDBreads and writes files inAmazon S3
- DuckDBcan query and write toPostgreSQL
What uses DuckDB
- C++is the implementation language ofDuckDB
- jOOQgenerates classes from and queriesDuckDB
- Evidenceran legacy page queries in the browser onDuckDB
- Observable Frameworkqueries data snapshots in the browser withDuckDB
- Arcruns its SQL queries withDuckDB
- DB Pilotembeds, and joins files and databases withDuckDB
- DbVisualizerconnects through generic JDBC toDuckDB
- KurrentDBanswers SQL queries with an embeddedDuckDB
- Apache TsFileis read and written, via an extension, byDuckDB
- Vortexis read and written, via an extension, byDuckDB
- Apache Arrowis queried in place byDuckDB
- Cloudflare Basin Catalogserves Iceberg tables toDuckDB
- Lakekeeperserves Iceberg tables toDuckDB
- Unity Catalogserves tables toDuckDB
- GizmoSQLserves over the networkDuckDB
- Hotdatatranslates SQL written forDuckDB
- Ibisdefaults to running locally onDuckDB
- Polarsshares DataFrames, via Arrow, withDuckDB
- Spice.ai OSScan accelerate datasets inDuckDB
- MotherDuckruns cloud instances ofDuckDB
- Pivotparses and plans SQL with a fork ofDuckDB
- Amazon S3 Tablesis attached as an Iceberg catalog byDuckDB
- LakeOpsroutes queries toDuckDB
- Airbytecaches PyAirbyte reads inDuckDB
- Bruinruns SQL assets onDuckDB
- dbtbuilds models locally inDuckDB
- Fivetrantests SDK connectors locally inDuckDB
- Meltanoloads data intoDuckDB
- SQLMeshbuilds models inDuckDB
- Streambedanswers psql queries with an embeddedDuckDB
- Cubequeries Parquet and CSV files throughDuckDB
- Legendcompiles model queries to SQL forDuckDB
- Malloycompiles queries to SQL forDuckDB
- PRQLruns inside, via a community extension,DuckDB
- Apache Supersetdraws dashboards overDuckDB
- Hexruns dataframe SQL cells withDuckDB
Query Parquet and Iceberg on S3, then write results back · sql
CREATE SECRET (TYPE s3, PROVIDER credential_chain);
SELECT country, count(*) AS orders
FROM 's3://acme-raw/orders/2026/*.parquet'
GROUP BY country ORDER BY orders DESC LIMIT 10;
INSTALL iceberg;
SELECT count(*) FROM iceberg_scan('s3://acme-lake/warehouse/sales/orders');
COPY (FROM 's3://acme-raw/orders/2026/*.parquet' WHERE amount > 100)
TO 's3://acme-lake/big-orders' (FORMAT parquet, PARTITION_BY (country));Python functions in SQL#
con.create_function(name, function, parameters, return_type) registers a Python function that SQL can call like a built-in. Types can be given as arguments or read from the function’s annotations; the return type is required one way or the other. The default type="native" calls the function once per row with plain Python values, which suits libraries that know nothing about Arrow. type="arrow" passes pyarrow arrays of up to 2,048 values and expects an array back, which is generally much faster. By default a NULL argument gives NULL without calling the function, and a Python exception fails the query (null_handling="special" and exception_handling="return_null" change that). DuckDB assumes the function is pure and may call it once and reuse the result, so pass side_effects=True for anything random or stateful. Registration needs NumPy installed; con.remove_function(name) drops a function again. Tested with DuckDB 2.0.0.
import duckdb
import pyarrow.compute as pc
from duckdb.sqltypes import VARCHAR
def domain(url: str) -> str: # native: called once per row
return url.split("/")[2]
def shout(s): # arrow: gets batches of up to 2,048 values
return pc.utf8_upper(s)
con = duckdb.connect()
con.create_function("domain", domain) # types come from the annotations
con.create_function("shout", shout, [VARCHAR], VARCHAR, type="arrow")
print(con.sql("""
SELECT domain(url) AS site, shout(domain(url)) AS loud
FROM (VALUES ('https://duckdb.org/docs'), (NULL)) t(url)
""").fetchall())
# [('duckdb.org', 'DUCKDB.ORG'), (None, None)] NULL in, NULL out by defaultHive-partitioned folders#
Many lakes keep one folder per partition value, such as orders/year=2026/month=10/. With hive_partitioning = true, read_parquet turns those folder names into columns, and DuckDB switches it on by itself when it sees key=value folders. A filter on a partition column is pushed into the scan, so folders that can’t match are never opened. Values that look like dates, timestamps or integers get those types (hive_types sets them explicitly, hive_types_autocast = 0 turns the guessing off). COPY ... TO with PARTITION_BY writes the same layout; it takes column names only, so compute a derived key such as the year in the query first. The partition values live in the folder names, not inside the Parquet files.
-- write one folder per value: s3://acme-lake/orders/year=2026/month=10/data_0.parquet
COPY (SELECT *, year(day) AS year, month(day) AS month FROM orders)
TO 's3://acme-lake/orders' (FORMAT parquet, PARTITION_BY (year, month));
-- read: folder names come back as columns, and the filter skips other folders
SELECT region, sum(amount) AS total
FROM read_parquet('s3://acme-lake/orders/*/*/*.parquet', hive_partitioning = true)
WHERE year = 2026 AND month = 10
GROUP BY region;See it in a real stack
Small lakehouse on DuckLake →Worth exploring
Benchmarks
Where it came from2018–2026
By the late 2010s, a data scientist with a few gigabytes in R or pandas had two poor options. A database server meant installing, configuring and loading data through a slow client protocol. SQLite ran inside the program with no setup, but it was built for transactions, with a row-by-row engine over B-trees, so analytical queries ran very slowly. The dataframe tools themselves offered relational-style operators but no query optimiser.
Mark Raasveldt and Hannes Mühleisen, database researchers at CWI in Amsterdam, had already built MonetDBLite, an embedded version of the MonetDB analytical database. It was popular, used from the Dutch central bank to the New Zealand police, but adapting a system that wasn’t built for embedding caused problems that were hard to fix. In 2018 they started again from scratch: a purpose-built analytical database that runs inside another program, as SQLite does. They presented DuckDB at SIGMOD 2019 in Amsterdam, MIT licensed from the start.
In 2021 the founders spun off a company from CWI, DuckDB Labs, to employ the core engineering team, and set up the non-profit DuckDB Foundation to hold most of the IP. DuckDB 1.0 arrived in June 2024 with a file format that later versions promise to keep reading. In May 2026 DuckDB Labs renamed itself DuckLabs. In August 2026 DuckLabs announced it would join AWS as a new subsidiary, expected to take effect in early September; DuckDB, DuckLake and Quack stay MIT licensed under the stewardship of the DuckDB Foundation.
Why it’s built this way
- Run inside the host process, like SQLite
- An embedded library needs no server, and because the database and application share memory, tables can move between DuckDB and pandas or R without being copied over a socket.
- A columnar, vectorised engine instead of SQLite’s row engine
- Analytical queries touch a few columns across many rows. Processing columns in batches of values uses the CPU far better than handling one row at a time.
- No external dependencies, and never crash the host
- MonetDBLite taught them that depending on external libraries caused trouble and that an embedded database that crashes takes the user’s program down with it. Queries that run out of memory must abort cleanly.
Timeline
- 2018
First code written at CWI in Amsterdam
- 2019
First release; demo paper at SIGMOD in Amsterdam
- 2021
DuckDB Labs spins off from CWI; the DuckDB Foundation is set up
- 2024
DuckDB 1.0 in June, with a stable storage format
- 2025
1.4.0 ships as a long-term support release; every other version will be LTS
- 2026
DuckLake 1.0 in April; DuckDB Labs becomes DuckLabs in May; DuckLabs announces in August it will join AWS; 2.0.0 LTS in October
- Raasveldt and Mühleisen: DuckDB: an Embeddable Analytical Database (SIGMOD 2019)
- DuckDB: History
- DuckDB blog: Announcing DuckDB 1.0.0 (Jun 2024)
- DuckDB blog: Announcing DuckDB 1.4.0 LTS (Sep 2025)
- DuckDB blog: DuckLake v1.0 reaches production-readiness (Apr 2026)
- DuckDB blog: DuckLabs to join AWS, projects to remain open source (Aug 2026)
- DuckDB: Release calendar (2.0.0 LTS, 21 October 2026)
Sources19 · facts checked 23 October 2026
- DuckDB: Why DuckDB
- DuckDB: Installation
- DuckDB docs: Installing the Python client
- DuckDB docs: Tuning workloads (larger-than-memory processing)
- DuckDB docs: Concurrency
- DuckDB docs: Reading and writing Parquet files (projection and filter pushdown)
- DuckDB docs: httpfs extension for HTTP and S3
- DuckDB docs: S3 API support
- DuckDB docs: Iceberg extension
- DuckDB docs: Writing to Iceberg
- DuckDB docs: Delta extension
- DuckDB docs: PostgreSQL extension
- DuckDB docs: DuckLake extension
- DuckDB docs: Lance extension
- DuckDB: Release calendar (current and LTS releases)
- DuckDB FAQ: DuckDB Foundation, DuckLabs and licensing
- DuckDB docs: JSON overview
- DuckDB docs: Python function API (create_function, native and Arrow UDFs)
- DuckDB docs: Hive partitioning (reading, filter pushdown, PARTITION_BY)