The one huge caveat for anyone that cannot use dynamic linking e.g. in an AppStore context, DuckDB isn’t a great choice. It’s very hard to statically link extensions. This is where Arrow wins I think. Arrow CPP for example has very portable builds and the C interface is very usable for building bindings. DuckDB is excellent, but it’s more a black box than a library. Edit: after a conversation with a robot, it would s…
DuckDB Internals Part 1
61–70 of 165 posts
Re: DuckDB Internals Part 1
#62Re: DuckDB Internals Part 1
#63Is everything becoming columnar? Parquet stores data per column instead of per row because it improves compression. I get that. Arrow apparently is columnar, and now DuckDB also gets its efficiency by treating data as columns instead of rows? I still need to wrap my head around how that works, but it's a fascinating development.
Re: DuckDB Internals Part 1
#64The only reason I know and use DuckDB is because my (internal, private-use-only, experimental) vibe coded projects use it a ton. I didn't pick it - LLMs did. Until this article, I wasn't aware of what it actually is capable of. Most of these projects use JSON(L) files for storage, and duckdb to process them.
If you haven’t investigated storing in parquet format - and it doesn’t break other consumers that need your jsonl formatted files - it could be worth trialling for your use case. You’ll see vastly smaller file sizes (even more so if you use zstd compression), and querying time will shoot up. Usual caveats apply, but as a general rule it’s held up well for me. Only downside is that inspecting the results moves from vi…
Re: DuckDB Internals Part 1
#65> DuckDB has received widespread adoption because it's just so damn easy to use. This was a major factor in my initial adoption. Since then it has stuck because it’s also absurdly capable, versatile, and fast. If it wasn’t so easy to use I suspect I wouldn’t have adopted it when I did. The ergonomics are crazy. It still impresses me regularly.
What do you use it for? I’m perpetually interested in using DuckDB, but it doesn’t seem to do anything I need.
Re: DuckDB Internals Part 1
#66Why is DuckDB so popular when one can use Python + Pandas? Better perf + SQL is that mostly it?
The better question is, why is DuckDB so popular when one can use Polars which has a sane, lintable, typesafe API compared to the mess that is SQL: WITH lagged AS ( SELECT *, LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time) AS prev_time FROM events ), sessions AS ( SELECT *, SUM(COALESCE((date_diff('minute', prev_time, event_time) > 30)::INT, 1)) OVER (PARTITION BY user_id ORDER BY event_time) AS sessi…
Re: DuckDB Internals Part 1
#67If DuckDB is so fast and has no data transfer overheads, does it need all this typical SQL machinery with filtering and joining via SELECT queries? Wouldn't it be simpler and faster to return all data to the caller code (all table rows, but only requested columns) and let it perform all other necessary data processing logic?
Re: DuckDB Internals Part 1
#68Earlier quoted context omitted.
Just curious whether one can earn money making these exts?
You can definately offer consultation or custom integration.
Thanks in Advance
Re: DuckDB Internals Part 1
#69The one huge caveat for anyone that cannot use dynamic linking e.g. in an AppStore context, DuckDB isn’t a great choice. It’s very hard to statically link extensions. This is where Arrow wins I think. Arrow CPP for example has very portable builds and the C interface is very usable for building bindings. DuckDB is excellent, but it’s more a black box than a library. Edit: after a conversation with a robot, it would s…
I can't confirm this, I have several instances which have statically linked extensions...
So being more specific, I don't know how I could get a static build of DuckDB to work with Parquet and httpfs (i.e. query S3) working in an app store environment. It was a day's work to get Arrow CPP to call back into Swift for the transport layer.
However I do now see that DuckDB recently provided an extension point for providing your own transport layer, so my point might well be moot for that reason [2].
[1] https://github.com/duckdb/duckdb/issues/16190 [2] https://github.com/duckdb/duckdb/pull/17464
Re: DuckDB Internals Part 1
#70DuckDB is amazing for any sort of fast data analysis when the data is small enough that it can fit on your laptop Recently at work I've been using it to analyse the Claude code sessions of every engineer at our company (that we upload to S3) and it's been extremely helpful to help us find gaps in devex and have clear metrics to back up the impact of fixing them Another thing it's been really useful for has been getti…
>Recently at work I've been using it to analyse the Claude code sessions of every engineer at our company (that we upload to S3) and it's been extremely helpful to help us find gaps in devex and have clear metrics to back up the impact of fixing them Nice! How do you set things up so that your engineers's claude code sessions upload to S3? Thanks for the help in advance