Skip to content
Tech News
← Back to articles

A Preview of DuckDB v2.0

read original more articles
Why This Matters

DuckDB v2.0, set to release this fall, marks a significant evolution by introducing server capabilities, triggers, a new VARIANT data type, and enhanced performance features like asynchronous I/O. This major update positions DuckDB as a more versatile and scalable database solution, appealing to both developers and enterprise users seeking embedded and server-based database functionalities.

Key Takeaways

A Preview of DuckDB v2.0

Mark Raasveldt and Hannes Mühleisen | 15 min

TL;DR: DuckDB v2.0 is coming this fall. In this post, we preview its headline features: DuckDB as a server, triggers, the VARIANT type, asynchronous I/O, a new SQL parser, a new storage format, and much more.

DuckDB v2.0 will be named “Cyanoptera” after the cinnamon teal (Anas cyanoptera), a strikingly reddish-brown duck found in the western Americas.

A major version bump is not something we do lightly, and it is not just ceremony: v2.0 ships a new SQL parser, a new default storage format, a reworked C API, and a small number of carefully chosen breaking changes. But above all, it is a feature release, built from over 10,000 commits since we released v1.5 in March. Where last year was the year of the lakehouse, this release kicks off the year of DuckDB as a server. We previewed many of these features in the “State of the Duck” talk at DuckCon #7, if you prefer to watch instead of read.

DuckDB is moving rather quickly, and we can only cover a small fraction of the changes here. Condensing all new features down to a shortlist is always a fight over what gets in, and yes, we know that what follows is technically a listicle (Ten Things Coming to DuckDB v2.0, Number Eight Will Shock You). We are not proud of the format, but it works, so here it is, starting with the SQL-level features and working down into the engine.

DuckDB has been an in-process database since day one. But people have asked us – very persistently – for a client/server mode, and we have finally caved. The quack extension implements DuckDB's native protocol for talking to other DuckDBs. It was released as a preview shortly before DuckCon #7, graduates to stable in v2.0, and it is a big part of where DuckDB is headed: any DuckDB process can serve its databases over the network, and any other DuckDB can attach to it and route queries there using the new CONNECT statement. For example:

DuckDB server CALL quack_serve ( token = 'my_token' ); quack: DuckDB client ATTACH 'quack:server.example.com' AS qk ( TOKEN 'my_token' ); CONNECT qk ; SELECT count ( * ) FROM events ; -- executes on the server, -- results stream back DISCONNECT ;

CONNECT is the successor to the remote.query($$...$$) workaround we showed when Quack was first revealed – we looked at that syntax and said: no, this cannot be it. And CONNECT is not limited to Quack: it points your session at any remote database that supports it, and the new remote pushdown optimizer (#22914) ships SQL directly to PostgreSQL and MySQL instead of pulling tables over the wire:

CONNECT 'postgres://localhost/mydb' ; SELECT count ( * ) FROM orders ; -- runs on the PostgreSQL server DISCONNECT ;

... continue reading