This page tracks the documentation for the features introduced in DuckDB 2.0, organized around the themes of the DuckDB v2.0 highlights blog post. Each section links to the relevant documentation.
DuckDB as a Server: Quack and CONNECT
DuckDB 2.0 can run as a server, letting multiple clients connect to a shared instance over the network. The quack extension provides the remote protocol, and the new CONNECT and DISCONNECT statements open and close connections from SQL. The command line client can start a server and attach to one directly.
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 adds 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 extends 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
$⟨variable⟩variable shorthand, including session variables as default parameter values - JSON mutation functions
- Grouping by
UNNEST - The SQL-standard
FETCH FIRSTsyntax 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 includes optimizer and engine improvements, including faster recursive CTEs and better 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. Because the format is not backward compatible, a migration guide covers upgrading existing deployments.
- Default storage version
- Storage version table
- Migrating existing deployments: see the DuckDB v2.0 migration guide
A Brand New SQL Parser
DuckDB 2.0 introduces a PEG-based SQL parser that replaces the PostgreSQL-derived one and allows extensions to contribute grammar.
Timezones, Calendars, and Collations Without ICU
DuckDB 2.0 provides a smaller, faster native implementation of timezone, calendar, and collation support, reducing reliance on the ICU extension.
Write Extensions Once, Host Them Yourself
DuckDB 2.0 ships a revamped, stable C API with a versioned ABI, so an extension built once keeps working across releases. You can also register and host your own extension repositories, including static linking into custom builds.
- C API
- Extension repositories
- Statically linking extensions: see Statically Linking Extensions
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
DEFERREDprimary key and unique constraints checked at commit timeEXPLAIN (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, an interactive assistant in the command line client
- CLI command history: the
.historycommand and theshell_history()table function - Pretty-printed, highlighted
.schemaoutput with--no-indentto restore the single-line form
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 - IEEE floating-point operation semantics for integer division by zero
- 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