OLAP vs OLTP: two kinds of database workload
OLTP (online transaction processing) is the workload of an application: many small reads and writes, each touching a few rows by key. OLAP (online analytical processing) is the workload of analysis: fewer queries, each scanning and aggregating millions of rows across a few columns.
Two shapes of query
An OLTP query looks like "fetch order 4242" or "decrement stock for SKU A-1". It must finish in milliseconds while thousands of others run at once, and it must never lose a write. An OLAP query looks like "revenue by month for the last year". It reads a large part of a table, but only a few of its columns, and nobody minds if it takes a second.
| OLTP | OLAP | |
|---|---|---|
| Typical query | Read or change one row by key | Scan and aggregate many rows |
| Concurrency | Thousands of short transactions | Tens of long queries |
| Storage layout | Row store | Column store |
| Indexes | B-tree on keys, essential | Few; min/max statistics and partitions skip data |
| Schema | Normalized, many tables | Often denormalized or star schema |
| Data | Current state | History, often months or years |
| Examples | PostgreSQL, MySQL, SQL Server, Oracle | DuckDB, ClickHouse, BigQuery, Snowflake |
Why one engine rarely does both well
The difference comes down to layout. A row store keeps every field of a row together, so reading or updating one order is one page. A columnar database keeps each column together, so summing one column over ten million rows reads only that column, but changing one row touches every column. Running heavy analytical scans on the production OLTP database also competes with the application for CPU, memory and I/O.
The same table makes the point in DuckDB, a columnar OLAP engine:
CREATE TABLE orders AS
SELECT range AS id,
range % 1000 AS customer_id,
round(random() * 100, 2)::DECIMAL(10,2) AS amount,
DATE '2026-01-01' + (range % 365)::INT AS order_date
FROM range(10_000_000);
-- OLAP: aggregate every row, two columns
SELECT date_trunc('month', order_date) AS month,
count(*) AS orders, sum(amount) AS revenue
FROM orders
GROUP BY month
ORDER BY month;
-- OLTP-shaped: one row by key
SELECT * FROM orders WHERE id = 4242;On a laptop the monthly aggregate over 10 million rows took about 40 milliseconds. Bulk analytics is DuckDB's strength. What it does not try to be is a server that takes thousands of concurrent small writes from an application. That is the OLTP database's job.
How the two connect
The classic setup copies data from OLTP databases into an analytical store on a schedule, through ETL or ELT (see ELT vs ETL). Newer setups also query the OLTP database in place for small, filtered reads, pushing the filter into the source so it only returns matching rows (see predicate pushdown). Hybrid systems (HTAP) try to serve both workloads from one database; most teams still keep them apart.
In Thunderduck
Thunderduck is an OLAP engine: every query runs on DuckDB. It reads OLTP databases (PostgreSQL, MySQL, SQL Server, Oracle) in place as catalogs and pushes filters down, so only matching rows leave the source. Every query is planned and priced before it runs and refused above the configured limit, which keeps an exploratory scan from landing on a production database unchecked.
For heavier or repeated analysis, copy the data into Iceberg with CREATE TABLE AS SELECT, then keep it current with a scheduled INSERT of the last day's rows or a pipeline. There is no change-data-capture stream yet; syncs run on a schedule.
Docs: https://docs.thunderduck.ai/data/loading/