Live data from Hacker News

DuckDB 0.7.0

duckdb.org

21–30 of 66 posts

Re: DuckDB 0.7.0

#21
post #5

This is an interesting niche. Can anyone explain what they're using it for currently? Much like Redis, I admire the technology but can't think of a project I've worked on that would benefit from it. Is it for games, maybe? Desktop or mobile apps?

Might be wrong, but it looks like duckdb lets you host the database engine in your process, so you don't pay for IPC. It is the opposite of Redis, as you use it to share memory between processes

Re: DuckDB 0.7.0

#22
post #9

> DuckDB is an in-process SQL OLAP database management system I don’t understand what it means. Can someone explain? I don’t get why they put such a complicated claim with unexplained acronyms on their homepage. When I shop for a db, when should I consider duck DB compared to for example Postgres or MySQL? Or do they compete with arrow or parquet? To me it’s unclear because they don’t say what they compete against.

https://en.wikipedia.org/wiki/Online_analytical_processing as opposed to https://en.wikipedia.org/wiki/Online_transaction_processing DuckDB is when you need to do OLAP analysis, and the data fits in a single node (your laptop), but it's too large for plain excel. technically you can use PG/MySQL/Python+Numpy+Pandas to process those data for that use case as well, but DuckDB does it easier/faster most of the time.

What do frontends for this type of stuff look like these days? I remember one of my first jobs out of college they had wired up an OLAP cube into Excel so that you could import it into a pivot table and arbitrarily slice and dice data by dragging and dropping columns. I thought that was the coolest thing. Is there a modern day non excel equivalent of this? Cube.js?

Re: DuckDB 0.7.0

#23
I haven't used it yet, but DuckDB looks really cool. I'm looking forwards to what MotherDuck releases with it. Having a great local-first product focused on datasets Meta comment: it's fascinating to me that so many people seem to have never heard of OLAP databases.

Re: DuckDB 0.7.0

#24
post #5

This is an interesting niche. Can anyone explain what they're using it for currently? Much like Redis, I admire the technology but can't think of a project I've worked on that would benefit from it. Is it for games, maybe? Desktop or mobile apps?

We're using it to migrate data pipelines in AWS which were previously run using Glue to Lambda with duckdb. Glue was too heavyweight, slow and expensive for our GB data volumes. We consume csv files use a lambda and duckdb to convert them to parquet. Then another lambda to load these parquet files and do our transformation logic (deduplications, enrichments, clean up, etc) and writing out to parquet files.

Re: DuckDB 0.7.0

#25
post #9

> DuckDB is an in-process SQL OLAP database management system I don’t understand what it means. Can someone explain? I don’t get why they put such a complicated claim with unexplained acronyms on their homepage. When I shop for a db, when should I consider duck DB compared to for example Postgres or MySQL? Or do they compete with arrow or parquet? To me it’s unclear because they don’t say what they compete against.

> in-process

think of sqlite.

> OLAP

think data warehouse. Columnar for analytical workloads.

If you want something "in-process" then you're probably going to have to decide between sqlite and duckdb.

If your workload is

  1) individual fast and frequent read-write operations (OLTP), then you should probably pick sqlite.

  2) massive amounts of read-heavy analytical operations (OLAP), then you should probably pick duckdb.
That's the decision process stated as simply as possible, but obviously there might be other options out there to consider.

Postgres and MySQL are really better suited for out-of-process (shared server) workloads where multiple clients are interacting with the data and resources/compute. They are both row-based OLTP databases, although I do believe Postgres has an option for both table types (HTAP).

Parquet is a file format, just as Avro, JSON, CSV,... are.

Arrow (still grasping this one) is a way that data can be exchanged between systems and processes in such a way that the data is optimized in such a way that doesn't have to go through the extra steps of being shuffled around in memory. For example the data that is returned from a SQL query can be used directly in a Python/Scala/etc dataframe if using Arrow.

I empathize with you about how confusing it all seems, but your curiosity will serve you well. I remember when I was asking these very same questions and it was being led down this road that opened my mind to the world of databases and data engineering.

Google "olap vs oltp" and when you get that, then google "olap vs oltp vs htap".

Or maybe read "The Log: What every software engineer should know about real-time data's unifying abstraction". I know how lame it sounds, but this article really did change the way I think about data.

https://engineering.linkedin.com/distributed-systems/log-wha...

Re: DuckDB 0.7.0

#26

Earlier quoted context omitted.

> I don’t understand what it means. It's like Sqlite(OLTP) but for OLAP.

This is still confusing, what do I use this for exactly?

Very, very roughly: OLTP is for dealing with one row at a time (TP = transaction processing; think “handling a sale”). OLAP is for combining many rows and extracting useful information from them (AP = analytics processing; think “figure out how many sales we had of each type of unit last month”). So for OLAP, you get more emphasis on features like joins, grouping and other analysis.

Re: DuckDB 0.7.0

#28
post #25
post #9

> DuckDB is an in-process SQL OLAP database management system I don’t understand what it means. Can someone explain? I don’t get why they put such a complicated claim with unexplained acronyms on their homepage. When I shop for a db, when should I consider duck DB compared to for example Postgres or MySQL? Or do they compete with arrow or parquet? To me it’s unclear because they don’t say what they compete against.

> in-process think of sqlite. > OLAP think data warehouse. Columnar for analytical workloads. If you want something "in-process" then you're probably going to have to decide between sqlite and duckdb. If your workload is 1) individual fast and frequent read-write operations (OLTP), then you should probably pick sqlite. 2) massive amounts of read-heavy analytical operations (OLAP), then you should probably pick duckdb…

> If you want something "in-process" then you're probably going to have to decide between sqlite and duckdb.

Now THAT is easy to understand. Thank you.

Post reply on HN