r/programming • • Aug 17 '26

A Preview of DuckDB v2.0

https://duckdb.org/2026/08/17/duckdb-20-highlights
258 Upvotes

23 comments sorted by

23

u/jared__ Aug 18 '26

i have used postgres for just about everything for building web and mobile apps. what can duckdb do that postgres can't (or does badly)?

9

u/BrewedDoritos Aug 18 '26

You wouldn't use it for that,

You would use DuckDB for data crunching, not as a transactional row store.

34

u/xmlhttplmfao Aug 18 '26 • Bravo

duckdb is a column oriented olap database. use it to ingest massive amounts of data and analyze it. if you have a workflow with lots of updates to existing rows, the need for transactions etc, use a traditional database

5

u/quack_quack_mofo Aug 18 '26

So it can be used for analytics? This user clicked that/searched that etc?

Is it heavy compared to postgres, assuming similar workload?

17

u/xmlhttplmfao Aug 18 '26

duckdb is very lightweight, it's more like sqlite3 than a full database system. It doesn't have users for example, it's just whoever has write/read access to the database file. And yeah you could ingest billions of rows of structured log data and then run analysis queries on it.

18

u/2bdb2 Aug 18 '26

i have used postgres for just about everything for building web and mobile apps. what can duckdb do that postgres can't (or does badly)?

DuckDB is more like something you'd include in an ETL script or batch reporting tool.

Want to run an SQL query against a folder full of CSV files on S3? DuckDB has you covered.

It just runs as a CLI or library, not as a server. Like SQLite, but it can just directly run SQL over damned near any format you'd want to run SQL on.

8

u/jared__ Aug 18 '26

Want to run an SQL query against a folder full of CSV files on S3? DuckDB has you covered.

well that piqued my interest. thank you!

1

u/Mechakoopa Aug 19 '26

It can (with an extension) read and analyze spatial data from various formats like SHP and GDB as well. That's been huge for us.

1

u/runawayasfastasucan Aug 22 '26

You can do select against a folder of files, a bucket or whatever as you would select from a table in normal sql.

1

u/itgforlife Aug 19 '26 edited Aug 19 '26

It's not a relational database. It's used for data analysis. DuckDbs competitor isn't postgres. It's Polars and to a lesser extent Spark / Databricks.

1

u/Playful_Guava1180 Aug 26 '26

andd Fabric, and any columnar stored Engine. even vertipaq

1

u/Playful_Guava1180 Aug 26 '26

its reading performance over tables is superior.

49

u/brunogadaleta Aug 17 '26

Awesome. Great piece of engineering and product management!

76

u/i_rate_slop Aug 17 '26

duckdb is easily in my top 5 most useful tools in my arsenal. it’s so convenient.

46

u/StatisticianMuch742 Aug 17 '26

Just out of curiosity, what are your top 5 most useful tools?

59

u/CaptainLethargic Aug 18 '26

In no particular order:
Claude code
Codex
GitHub copilot vs code ext
Duckdb
/s

7

u/Ace-Whole Aug 17 '26

Asking the right questions!

9

u/Catawompus Aug 17 '26

I agree that it’s awesome but my one complaint was using it in Go requiring CGO and thus makes performance monitoring a lot more difficult.

4

u/mereel Aug 17 '26

Isn't that an artifact of it not being written in Go?

3

u/Catawompus Aug 17 '26

Not necessarily. It’s more because it relies on linux libraries to run.

4

u/RegisteredJustToSay Aug 17 '26

I just wish it had better support for concurrency, but other than that I am an extremely happy user.

0

u/Agreeable_Creme_3435 Aug 20 '26

The new storage format in v2.0 could lead to significant improvements in query speed and data compression, especially with asynchronous I/O. I'm interested in seeing how this change affects performance, as a new default storage format is a big deal.