← Back to Glossary

Data warehouse

A data warehouse is a centralized system designed to store structured, cleaned data and support fast, complex analytical queries (OLAP), as opposed to the high-volume transactional workloads of an operational database.

Overview

A data warehouse is purpose-built for analytics: it stores structured, typically cleaned and modeled data, and is optimized for read-heavy queries that scan and aggregate large volumes of rows — the OLAP (Online Analytical Processing) workload. This contrasts with OLTP (Online Transactional Processing) databases like Postgres or MySQL, which are optimized for many small, concurrent reads and writes of individual records.

Structure and storage

Most analytical warehouses use columnar storage, which stores each column's values contiguously on disk. This makes it fast to scan only the columns a query needs and compresses well, since values within a column tend to be similar. Data is loaded into a warehouse through ETL/ELT pipelines, and a schema is enforced up front ("schema-on-write"), which is one of the key differences from a schema-on-read data lake.

Cloud data warehouses

Modern cloud warehouses such as Snowflake, Google BigQuery, and Amazon Redshift separate storage from compute, letting teams scale query capacity independently of stored data volume, and charge based on usage rather than fixed hardware.

DuckDB's place in the picture

DuckDB is an embedded, in-process analytical database — it runs the same columnar, vectorized query engine as a cloud warehouse, but as a library inside your process rather than a separate server. It's well suited to warehouse-style analytics on datasets that fit on a single machine, with no infrastructure to manage:

Copy code

CREATE TABLE sales AS SELECT * FROM read_parquet('sales_2026.parquet'); SELECT region, SUM(revenue) AS total_revenue FROM sales GROUP BY ALL ORDER BY ALL DESC;

MotherDuck extends this to a serverless cloud data warehouse built on DuckDB, letting the same SQL scale from a laptop to shared, cloud-hosted databases without switching engines.

Related terms

FAQS

A general-purpose database like Postgres or MySQL is usually optimized for transactional workloads (OLTP) — many small reads and writes. A data warehouse is optimized for OLAP: scanning and aggregating large volumes of data for analytics and reporting.

DuckDB is an embedded analytical (OLAP) database engine rather than a hosted warehouse service. It provides warehouse-style columnar, vectorized query performance but runs in-process, and MotherDuck builds a serverless cloud data warehouse on top of it.

Columnar storage keeps each column's values together on disk, so analytical queries that touch only a few columns out of many can skip the rest, and similar values compress more effectively than row-oriented storage.