Row-oriented storage
Row-oriented storage is a data layout that stores each record's fields contiguously on disk, so a whole row can be read or written in a single operation.
Overview
In a row-oriented (or "row store") layout, all the fields belonging to one row are physically stored next to each other. Reading or writing a full record — say, one customer's name, address, and account balance — touches one contiguous block of data. This is the layout used by classic transactional databases like PostgreSQL and MySQL in their default heap storage.
Row vs. Column Layout
Row storage shines for workloads that fetch or modify individual records: an application looking up "customer 4821" and updating one field wants exactly the pattern row storage provides — a single, localized read or write. The trade-off shows up in analytical queries: computing an aggregate over one column across millions of rows means reading every row's full width from disk even though only one field is used, wasting I/O on data the query never needed.
When Row Storage Wins
Row-oriented storage generally wins for OLTP (online transaction processing) workloads: high-volume, small reads and writes touching most or all columns of a few rows at a time — placing an order, updating a user's profile, appending an event. It's a poor fit for wide-scan, few-column analytical queries, which is why data warehouses and analytical engines favor columnar storage instead.
DuckDB's Perspective
DuckDB is not a row-oriented database — it's built as a columnar, vectorized engine specifically for OLAP-style analytical workloads. If your workload is dominated by single-row lookups and frequent small updates, a row-oriented database is typically the better fit; DuckDB is designed to complement, not replace, that kind of system by handling the analytical queries run over the same data.
Related terms
Columnar storage is a data layout that groups values from the same column together on disk, rather than storing complete rows contiguously, which speeds up analytical scans and compression.
OLAP vs OLTP →OLAP (Online Analytical Processing) and OLTP (Online Transaction Processing) are two workload categories: OLTP handles many small, concurrent transactional writes on normalized schemas, while OLAP handles large read-heavy analytical queries on denormalized, columnar data.
storage →DuckDB uses an efficient columnar storage format optimized for analytical queries.
OLTP →OLTP (Online Transaction Processing) refers to systems designed for fast, high-concurrency, small read/write transactions — like inserting an order or updating an account balance — typically backed by normalized relational schemas.
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.
row group →A row group is a fundamental storage concept in columnar databases like DuckDB that represents a horizontal partition of data containing a fixed number of…
FAQS
DuckDB is columnar. It stores and processes data column-by-column, which is optimized for analytical scans rather than single-row transactional lookups.
