This page tracks the documentation for the features introduced in DuckDB 2.0, organized around the themes of the DuckDB 2.0.0 release announcement. Each section links to the relevant documentation.
DuckDB as a Server: Quack and CONNECT
Since v1.5.3, DuckDB can run as a server via the Quack protocol, letting multiple clients connect to a shared instance over the network. DuckDB 2.0 ships a polished version of the quack extension, which provides the remote protocol, and adds the new CONNECT and DISCONNECT statements to open and close connections from SQL. The command line client can start a server and attach to one directly.
- Quack extension
CONNECTandDISCONNECTstatements- CLI
-serveand-connectarguments - Securing Quack with a reverse proxy
- Remote pushdown to PostgreSQL and MySQL
VARIANT Becomes a First-Class Citizen
The VARIANT type stores semi-structured, schema-less data such as JSON while keeping the performance of columnar execution. A family of variant_* functions constructs and inspects variant values.
Triggers
DuckDB 2.0 added trigger support, so you can run actions automatically in response to table changes. This is useful for building audit tables and enforcing invariants.
SQL Dialect Additions
DuckDB 2.0 extended the SQL dialect in several directions, from new join types to data-modifying CTEs and a friendlier variable syntax.
- Explicit join type syntax, including nearest (
NEAREST) joins - Data-modifying CTEs, including
COPY ...blocks in CTEs - Nested schemas
- The
$variablevariable shorthand, including session variables as default parameter values - JSON mutation functions
- Grouping by
UNNEST - The SQL-standard
FETCH FIRSTsyntax - Well-defined semantics for multiple matching source rows in
MERGE INTOandUPDATE ... FROM SECURE VIEWSHOWstatement- Setting a sequence value
regexp_extractadditions
Asynchronous I/O
DuckDB 2.0 issues reads in the background and keeps multiple requests in flight, which speeds up queries that read from object storage such as S3. The behavior is controlled by the async_threads and read-ahead settings.
Faster Queries Across the Board
DuckDB 2.0 included optimizer and engine improvements, including faster recursive CTEs and better row-group pruning.
- Recursive CTEs and the blog post on how DuckDB runs them faster
- Min-max indexes (zonemaps) used for row-group pruning
Storage Format v2.0
New database files use the v2.0.0 storage format by default. The format adds lazy metadata loading, better compression and corruption validation. DuckDB versions before 2.0 cannot read files in the new format, so a migration guide covers upgrading existing deployments.
- Default storage version
- Storage version table
- Migrating existing deployments: see the DuckDB 2.0 migration guide
A Brand New SQL Parser
DuckDB 2.0 introduced a PEG-based SQL parser that replaces the PostgreSQL-derived one and allows extensions to contribute grammar.
- PEG parser
- Legacy parser extension for switching back to the old parser
Timezones, Calendars and Collations Without ICU
DuckDB 2.0 replaces the ICU library with a smaller, faster native implementation of timezone, calendar and collation support in the icu extension.
Write Extensions Once, Host Them Yourself
DuckDB 2.0 shipped a revamped C API (C API v2), which is not yet stable. You can also register and host your own extension repositories or statically link extensions into custom builds.
- C API v2
- Extension repositories
- Statically linking extensions: see Statically Linking Extensions
Core Extension Updates
Several core extensions shipped new features alongside DuckDB 2.0.
- DuckLake extension, the reference implementation of DuckLake 1.1
- Iceberg extension
ATTACHoptions for REST catalogs - Creating Delta tables, time travel and
VARIANTcolumns in the Delta extension
Deprecations
DuckDB 2.0 disables or phases out a few features, which will be removed in future releases.
- The single-arrow lambda syntax, now disabled by default
- macOS x86_64 (
osx_amd64), for which community extensions are no longer built
Other Documentation Updates
Additional 2.0 features documented across the site, grouped by area.
SQL
TIMESTAMPTZ_NS, time zone aware timestamps with nanosecond precision- The
lttbaggregate for downsampling time series data - The new
extension_namecolumn induckdb_functions - The
duckdb_secret_type_parameters()function listing the parameters each secret type accepts - The
is_generatedandgeneration_expressioncolumns induckdb_columns()andinformation_schema.columns - The
decimal_divisionfunction for exact decimal division - The
decimal_averageaggregate for exact decimal averages - The
variant_group_objectaggregate for buildingVARIANTobjects - The
variant_group_arrayfunction for collecting values into aVARIANTarray - Renaming a view with
ALTER TABLE ... RENAME TOfor PostgreSQL compatibility EXCEPTas a synonym forEXCLUDEin star expressions- No-argument
GROUPING_ID()andGROUPING()defaulting to allGROUP BYcolumns - Backtick-quoted identifiers as an alternative to double quotes
EXPLAIN (SQL)rendering the optimized plan as executable SQL- Empty
STRUCTtypes
Data Import and Export
- Writing GeoJSON and loading GeoJSON
- The Parquet
schemaparameter and new Parquet writing options - The
PARTITION_PATHcopy option for computing custom partition subdirectories - The
ORDER_BYcopy option for sorting rows before writing - The
TIMESTAMP_IS_ADJUSTED_TO_UTCandWRITE_TIMESTAMP_AS_INT96Parquet writing options for controlling how timestamps are written - The
file_row_group_numbervirtual column for Parquet row group pruning - The
rejects_line_size_limitCSV parameter for bounding stored rejected lines
Clients
- CLI agent mode, which produces compact, machine-readable output when the CLI is driven by an AI coding agent
- CLI command history: the
.historycommand and theshell_history()table function - Pretty-printed, highlighted
.schemaoutput with--no-indentto restore the single-line form - Migrating Python code to DuckDB 2.0: the changes that code written for DuckDB 1.x needs
- Python relations that run their query on every read, and parallel Python queries with one cursor per thread
- Open results of the Python DB API with
complete()andabort(), and Python transactions that a failedexecute()aborts - The Python appender for inserting rows that Python code produces
- Python expression helpers such as
col(),lit()andfn(), aggregates and window functions on expressions and new relation methods such aswith_columns(),group_by()andpivot()in the Relational API
Configuration and Profiling
- Setting
max_memoryas a percentage of total system memory - The
max_execution_timesetting for bounding query wall-clock time - The
checkpoint_on_detachsetting controlling checkpoints when detaching a database - Deprecation of implicit identifier-to-string conversion in table function arguments, with the
table_function_identifier_conversionsetting - Removal of the
enable_http_loggingandhttp_logging_outputsettings in favor of the unified logging framework - The
http_client_pool_capacitysetting for sizing the asynchronous HTTP client pool - The metrics layer and the
tracked_metricssetting - Integer division by zero now raises an error
- The
webprofiling format and the CLI.webcommand for opening query graphs in a browser
Building
- A C++17 compiler is now required to build DuckDB