<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg" -->

---
title: Rows vs. Columns: How different are they, really?
description: Storing data by column instead of by row changes nearly every layer of query execution, not just storage layout. Row stores like Postgres and MySQL keep each...
canonical: https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Rows vs. Columns: How different are they, really? | daily.dev
og:description: Storing data by column instead of by row changes nearly every layer of query execution, not just storage layout. Row stores like Postgres and MySQL keep each...
og:url: https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg
og:image: https://api.daily.dev/og/posts/XUjSerjvG.png
og:image:alt: Rows vs. Columns: How different are they, really?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rows vs. Columns: How different are they, really?

**[Hacker News](https://daily.dev/sources/hn)** · 25 min read · 2 upvotes · 0 comments

## Summary

Storing data by column instead of by row changes nearly every layer of query execution, not just storage layout. Row stores like Postgres and MySQL keep each record's fields together, which is efficient for small transactional reads and writes but wasteful for analytics: fetching one 4-byte column from a 48-byte row can mean reading 12 times more data than needed, scaling to 48 MB vs 4 MB on a million rows. Column stores like DuckDB and ClickHouse instead process data in batches (MonetDB/X100 uses 1024, DuckDB 2048, DataFusion 8192), enabling SIMD instructions like AVX-512's vpaddq to add 8 values at once. Columnar layouts also compress far better, and lightweight encodings let queries like Vortex's compute directly on compressed data without fully decoding it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://spiraldb.com/blog/rows-vs-columns>

## Questions this post answers

### Why are columnar databases faster for analytics queries than row-based databases like Postgres?

Column stores keep each column's values contiguous in memory, so a query needing only one or two columns can scan just those arrays instead of reading every field of every row. In a row store, reading a single 4-byte column from a 48-byte row still requires fetching the whole 64-byte cache line, wasting about 12x the needed data, which scales to 48 MB read instead of 4 MB on a million rows.

_Comparing row versus column storage for an analytics workload is easier with grounded explainers like this on daily.dev._

### What batch size do vectorized query engines like DuckDB and DataFusion use for processing columns?

MonetDB/X100, the system that introduced vectorized execution, used 1024 values per batch by default. DuckDB uses 2048 values per batch, and Apache DataFusion uses 8192. Batching lets a database pay bookkeeping costs once per batch instead of once per row, and keeps each batch small enough to fit in CPU cache while enabling SIMD instructions to process multiple values per instruction.

_Developers tuning query engines can track these implementation details on daily.dev while picking a database._

### Why doesn't AVX-512's vpaddq instruction just add 8 numbers together into one sum?

The vpaddq instruction operates on a 512-bit register with 8 separate 64-bit slots, each holding its own independent running sum rather than combining all 8 input values into one total. Each incoming value is added to its own slot across loop iterations, and only after the loop finishes do the 8 partial sums in the register get added together to produce the final result.

_Anyone optimizing hot loops with SIMD can keep facts like this straight via daily.dev._

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 49 comments across hackernews (as of 2026-11-17).

**TL;DR:** The discussion is largely appreciative of the explainer and dives deep into tangents on compression, indexing, and HTAP (hybrid transactional/analytical) systems, debating whether row/column unification is really achievable in practice.

**Sentiment:** 55% positive · 35% mixed · 10% skeptical

**The case for**

- Several people praised the post as a clear, enjoyable explanation of row vs. column storage.
- Some pointed to real systems (CedarDB, Lakebase, TiDB, SingleStore, SQL Server columnstore) as evidence that blending transactional and analytical storage is workable today.
- One commenter described building a custom KV/columnar hybrid store that outperformed traditional databases on both OLTP and OLAP workloads.

**The pushback**

- Many argued HTAP has historically failed because optimizing for both transactional and analytical workloads forces unavoidable tradeoffs and loses workload isolation.
- Some felt combining engines (e.g. Lakebase) is just 'superglued' systems rather than a true unified solution.
- A side debate noted that clustered/covering indexes in systems like Postgres are often misunderstood as true columnar storage, which they are not.

**By community**

- hackernews (mixed): Praise for the writeup is mixed with a substantive, somewhat skeptical debate over whether transactional+analytical databases can truly be unified, plus tangents on compression and indexing details.

**Hottest debate:** Whether hybrid transactional/analytical (HTAP) databases can ever truly succeed or if workload specialization will always win out.

**Open questions**

- Will transaction+analytics unification become standard, or remain a niche tradeoff-laden approach?
- What is the origin of the shift from PAX-style disk-page-sized row groups to the much larger row groups used in Parquet?
- What competing systems offer functionality similar to Vortex/SpiralDB?

**Highlights**

> > Those consequences are the reason that most database systems are built for either transactions or analytics, and not both. [24] > [...] > [24] People have tried to build one system that does both in the past (HTAP, or hybrid transactional/analytical processing), but those attempts generally didn't work out. Some newer systems seem to be bridging the gap, however. CedarDB, the commercial version of Umbra (a research system from TU Munich), runs transactions and analytics on just one engine and one copy of the data. Databricks' Lakebase keeps Postgres (a row store) as the engine for transactional queries, but its storage layer rewrites the same data into columnar formats in the background, allowing an analytical engine to query it. The footnote says "those attempts generally didn't work out" but then mentions Lakebase and CedarDB as newer efforts. Can anyone speak to whether or not CedarDB, Lakebase (and any others?) are achieving the fabled transactions + analytics in one database? Should we expect, at some point in the near future, for transactions + analytics to be standard in all databases, or is combining them a niche / esoteric thing with many tradeoffs?
> — [reticulates on hackernews · 6 comments](https://news.ycombinator.com/item?id=50530630)

> You are correct! And sadly the vast majority of people don't want to make choices or think about that tradeoff. If it can't outperform pure OLTP and it can't outperform pure OLAP then there is no pit of success for such an HTAP system. The unfortunate part is that the vast majority of software out there in the world would be served perfectly with an HTAP solution. The fortunate part is that for a lot of problems you can just run Postgres and then when you need analytics you can still use Postgres, until you hit scaling issues (if ever). I've never seen a project choose to solve OLAP and OLTP upfront and succeed.
> — [xyzzy\_plugh on hackernews](https://news.ycombinator.com/item?id=50533269)

> Lakebase is just cheating, they superglued a transactional database to an analytical one. That said, it works wonderfully and I love it.
> — [florbnit on hackernews](https://news.ycombinator.com/item?id=50534648)

> The simple example of computing an average over a single column makes it seem like each columns data is stored by itself, but as soon as you want to do something with the correlation of two columns (such as a simple single column group by) doesnt that mean that each column would have to store both the column's value and some kind of row identifier that lets you join with the other columns in the same record? I've never looked into columnar stores so this is an honest question, I just always assumed thats how it would have to be structured
> — [netcraft on hackernews · 1 comments](https://news.ycombinator.com/item?id=50532763)

> One of the cool things about Vortex (which is a file format, but in this context can be better thought of as the storage layer of a DBMS) is that we have implemented compression encodings that _do_ support fast random access. For example, FastLanes allows us to bit-pack values extremely effectively while retaining random access, and this can be combined with other encodings such as ALP and FSST. I believe Vortex is unique in its ability to retain random access while recursively compressing data. And turns out that this is helpful for both in-memory _and_ on-disk (we might write about that in the future)! I unfortunately didn't have much space to write about that in this blog, but in the compression section I did link to other blogs that we have written that go into much more detail, if you are interested :D
> — [ConnorTsui20 on hackernews](https://news.ycombinator.com/item?id=50530869)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50470523) · 139 points · 49 comments
- [hackernews](https://news.ycombinator.com/item?id=50500007) · 3 points · 0 comments

## Similar posts on daily.dev

- [What Is Columnar Storage and Why Does It Make Analytics Faster?](https://daily.dev/posts/what-is-columnar-storage-and-why-does-it-make-analytics-faster--8rsddrzrh) · CrateDB · 0 upvotes · 0 comments
- [How to Pick the Right Engine for Your Workload](https://daily.dev/posts/how-to-pick-the-right-engine-for-your-workload-96efgauay) · SingleStore · 0 upvotes · 1 comments
- [Parquet Files Explained: Why Every Data Engineer should Use](https://daily.dev/posts/parquet-files-explained-why-every-data-engineer-should-use-mz7jytdxj) · Medium · 1 upvotes · 0 comments
- [ClickHouse vs PostgreSQL: Choosing the Right Database for Analytics](https://daily.dev/posts/clickhouse-vs-postgresql-choosing-the-right-database-for-analytics-ckxz2ek9o) · BigData Boutique blog · 3 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#compression](https://daily.dev/tags/compression)

[View this post on daily.dev](https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Rows vs. Columns: How different are they, really?","url":"https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg"},"datePublished":"2026-11-17T15:53:15.447Z","dateModified":"2026-11-17T20:10:21.381Z","description":"Storing data by column instead of by row changes nearly every layer of query execution, not just storage layout. Row stores like Postgres and MySQL keep each...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c32c11466ab2fd19d66862daf84ce019?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c32c11466ab2fd19d66862daf84ce019?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,compression","timeRequired":"PT25M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Rows vs. Columns: How different are they, really?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/rows-vs-columns-how-different-are-they-really--xujserjvg#faq","mainEntity":[{"@type":"Question","name":"Why are columnar databases faster for analytics queries than row-based databases like Postgres?","acceptedAnswer":{"@type":"Answer","text":"Column stores keep each column's values contiguous in memory, so a query needing only one or two columns can scan just those arrays instead of reading every field of every row. In a row store, reading a single 4-byte column from a 48-byte row still requires fetching the whole 64-byte cache line, wasting about 12x the needed data, which scales to 48 MB read instead of 4 MB on a million rows. Comparing row versus column storage for an analytics workload is easier with grounded explainers like this on daily.dev."}},{"@type":"Question","name":"What batch size do vectorized query engines like DuckDB and DataFusion use for processing columns?","acceptedAnswer":{"@type":"Answer","text":"MonetDB/X100, the system that introduced vectorized execution, used 1024 values per batch by default. DuckDB uses 2048 values per batch, and Apache DataFusion uses 8192. Batching lets a database pay bookkeeping costs once per batch instead of once per row, and keeps each batch small enough to fit in CPU cache while enabling SIMD instructions to process multiple values per instruction. Developers tuning query engines can track these implementation details on daily.dev while picking a database."}},{"@type":"Question","name":"Why doesn't AVX-512's vpaddq instruction just add 8 numbers together into one sum?","acceptedAnswer":{"@type":"Answer","text":"The vpaddq instruction operates on a 512-bit register with 8 separate 64-bit slots, each holding its own independent running sum rather than combining all 8 input values into one total. Each incoming value is added to its own slot across loop iterations, and only after the loop finishes do the 8 partial sums in the register get added together to produce the final result. Anyone optimizing hot loops with SIMD can keep facts like this straight via daily.dev."}}]}
```

