Fireship · @fireship
DuckDB in 100 Seconds
Uploaded August 14, 2025 · Length 2:23
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.
- 0:00
Aduct DB, an open-source fast embeddible
- 0:03
SQL OLAP database that simplifies the
- 0:05
way developers implement analytics. It
- 0:07
was developed in the Netherlands,
- 0:09
written in C++, and first released in
- 0:11
2019. And the TLDDR is that it's like
- 0:14
SQL light, but for columnar data.
- 0:16
Everybody knows that SQLite is the most
- 0:18
deployed database in the world. And
- 0:19
that's because it runs as a single
- 0:21
binary with no dedicated database
- 0:23
management server process necessary,
- 0:24
allowing it to be embedded almost
- 0:26
anywhere, like the billions of
- 0:27
smartphones around the world. Duct DB is
- 0:29
built on the same philosophy, but
- 0:31
instead of storing data row-wise, it
- 0:33
stores it column-wise. But why does that
- 0:35
matter? Well, you see, storing rows
- 0:37
together is great for transactional
- 0:38
workloads like most apps out there, like
- 0:40
an e-commerce website where you need to
- 0:42
read and write entire records at the
- 0:44
same time, but it's not so great for
- 0:46
high volume time series data commonly
- 0:48
found in analytics and IoT where you
- 0:50
need to read and analyze all the data in
- 0:52
one column across many records. When
- 0:54
storage is optimized for columns, it
- 0:56
opens the door to much faster data
- 0:57
aggregation like calculating an average
- 1:00
in addition to much faster filters and
- 1:02
joins. And DUTDB achieves excellent
- 1:04
performance with massive data sets
- 1:06
thanks to its columnar vectorzed query
- 1:08
execution engine where large batches of
- 1:10
values are processed as vectors in one
- 1:12
operation in parallel. It's already in
- 1:14
use at big companies like Meta, Google,
- 1:16
and Airbnb. And you can get started by
- 1:18
installing it. Then run the duct DB
- 1:20
command from the terminal. And now we
- 1:22
can start inserting data just like any
- 1:23
other SQL database. Then if we want to
- 1:25
read an individual column, we can do so
- 1:27
with a select query. And what's
- 1:29
especially awesome is that if we have
- 1:31
some existing data in a CSV or parquet
- 1:33
file, we can access it directly in a SQL
- 1:35
statement. In addition, we could take
- 1:37
that data then output it to a different
- 1:39
format like JSON or even an HTML table.
- 1:42
That's cool and all, but the real power
- 1:44
of this database is its ability to
- 1:45
perform aggregations when working with
- 1:47
time series data. Like imagine we have a
- 1:49
massive data set of stock prices and
- 1:51
need to calculate things like the
- 1:53
average, max, and min values for the
- 1:55
last day. We can easily achieve that in
- 1:57
a select statement thanks to built-in
- 1:59
aggregate functions. Then use group by


