Row Store vs. Columnar Store

4 weeks ago

Row Store vs. Columnar Store

Same rows, same schema. Only the layout on disk changes, and that one choice decides what the database is good at.

  • A row store keeps each row contiguous. Perfect when we want everything about one record, like give us this whole order. Wasteful when we want three columns across a million rows, because the disk still steps over every other column to get there.

  • A columnar store keeps each column contiguous instead. An average over one column touches that column and skips the rest of the table. Values in a column also share a type and repeat often, so they compress far better than a mixed row does [5].

Row store keeps each row contiguous. A columnar store keeps each column contiguous.
Row store keeps each row contiguous. A columnar store keeps each column contiguous.

That second shape is what analytics looks like, wide scans over many rows that only touch a few narrow columns. That’s why OLAP engines are columnar and OLTP engines are not.

I ran into the gap directly. In my South Korea World Cup Analytics Warehouse, migrating the dbt star schema from local DuckDB to AWS Athena over partitioned S3 Parquet cut bytes scanned 331x. Parquet is columnar [4], so Athena reads only the columns a query names. Same 234K+ events, same queries, different layout on disk.

The Postgres schema I built during my internship was different. The app reads and writes one SKU record at a time, so a row store is what it wants.


References

[1] Amazon Web Services, “Columnar storage,” Amazon Redshift Database Developer Guide. [Online]. Available: https://docs.aws.amazon.com/redshift/latest/dg/c_columnar_storage_disk_mem_mgmnt.html. [Accessed: Jul. 8, 2026].

[2] Amazon Web Services, “Amazon RDS vs. Amazon Redshift,” AWS Cloud Comparisons. [Online]. Available: https://aws.amazon.com/compare/rds-and-redshift/. [Accessed: Jul. 8, 2026].

[3] Amazon Web Services, “What is database storage?” AWS Cloud Computing Concepts Hub. [Online]. Available: https://aws.amazon.com/what-is/database-storage/. [Accessed: Jul. 25, 2026].

[4] Apache Software Foundation, “Overview,” Apache Parquet Documentation, Nov. 12, 2025. [Online]. Available: https://parquet.apache.org/docs/overview/.

[5] A. Brown, “Row-oriented vs. column-oriented databases: A head-to-head comparison,” ClickHouse Engineering Resources, May 8, 2026. [Online]. Available: https://clickhouse.com/resources/engineering/row-vs-column-database.