Fireship · @fireship

DuckDB in 100 Seconds

Uploaded August 14, 2025 · Length 2:23

DuckDB in 100 Seconds

Summary

DuckDB is an open-source SQL database for columnar data that simplifies analytics and offers fast data aggregation and filtering.

  • duckdb
  • sql database
  • columnar data
  • data analytics
  • vectorized query execution

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Aduct DB, an open-source fast embeddible

  2. 0:03

    SQL OLAP database that simplifies the

  3. 0:05

    way developers implement analytics. It

  4. 0:07

    was developed in the Netherlands,

  5. 0:09

    written in C++, and first released in

  6. 0:11

    2019. And the TLDDR is that it's like

  7. 0:14

    SQL light, but for columnar data.

  8. 0:16

    Everybody knows that SQLite is the most

  9. 0:18

    deployed database in the world. And

  10. 0:19

    that's because it runs as a single

  11. 0:21

    binary with no dedicated database

  12. 0:23

    management server process necessary,

  13. 0:24

    allowing it to be embedded almost

  14. 0:26

    anywhere, like the billions of

  15. 0:27

    smartphones around the world. Duct DB is

  16. 0:29

    built on the same philosophy, but

  17. 0:31

    instead of storing data row-wise, it

  18. 0:33

    stores it column-wise. But why does that

  19. 0:35

    matter? Well, you see, storing rows

  20. 0:37

    together is great for transactional

  21. 0:38

    workloads like most apps out there, like

  22. 0:40

    an e-commerce website where you need to

  23. 0:42

    read and write entire records at the

  24. 0:44

    same time, but it's not so great for

  25. 0:46

    high volume time series data commonly

  26. 0:48

    found in analytics and IoT where you

  27. 0:50

    need to read and analyze all the data in

  28. 0:52

    one column across many records. When

  29. 0:54

    storage is optimized for columns, it

  30. 0:56

    opens the door to much faster data

  31. 0:57

    aggregation like calculating an average

  32. 1:00

    in addition to much faster filters and

  33. 1:02

    joins. And DUTDB achieves excellent

  34. 1:04

    performance with massive data sets

  35. 1:06

    thanks to its columnar vectorzed query

  36. 1:08

    execution engine where large batches of

  37. 1:10

    values are processed as vectors in one

  38. 1:12

    operation in parallel. It's already in

  39. 1:14

    use at big companies like Meta, Google,

  40. 1:16

    and Airbnb. And you can get started by

  41. 1:18

    installing it. Then run the duct DB

  42. 1:20

    command from the terminal. And now we

  43. 1:22

    can start inserting data just like any

  44. 1:23

    other SQL database. Then if we want to

  45. 1:25

    read an individual column, we can do so

  46. 1:27

    with a select query. And what's

  47. 1:29

    especially awesome is that if we have

  48. 1:31

    some existing data in a CSV or parquet

  49. 1:33

    file, we can access it directly in a SQL

  50. 1:35

    statement. In addition, we could take

  51. 1:37

    that data then output it to a different

  52. 1:39

    format like JSON or even an HTML table.

  53. 1:42

    That's cool and all, but the real power

  54. 1:44

    of this database is its ability to

  55. 1:45

    perform aggregations when working with

  56. 1:47

    time series data. Like imagine we have a

  57. 1:49

    massive data set of stock prices and

  58. 1:51

    need to calculate things like the

  59. 1:53

    average, max, and min values for the

  60. 1:55

    last day. We can easily achieve that in

  61. 1:57

    a select statement thanks to built-in

  62. 1:59

    aggregate functions. Then use group by