{
  "id": 22029542,
  "title": "Columnar vs Row Storage: Two Ways to Lay Out the Same Table",
  "url": "https://urgent.news/2026/11/26/columnar-vs-row-storage-two-ways-to-lay-out-the-same-table",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-26T19:19:04.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gxqwb_ai/columnar-vs-row-storage-two-ways-to-lay-out-the-same-table-4nn"
  },
  "original_language": "en",
  "account": "In the realm of database storage, two primary methods exist: row storage and columnar storage. Both approaches physically arrange data differently on disk, impacting how queries interact with the database.\n\nRow storage organizes data by storing the fields of a single record next to each other, forming a contiguous blob. This layout optimizes for fetching and modifying whole records, making it ideal for online transaction processing where individual records are frequently accessed and updated based on a key. Updating a customer's balance, for instance, only requires touching one place in a row store.\n\nColumnar storage, on the other hand, groups one field across many records adjacent, creating one contiguous stream for each field. This layout excels at reading a few fields across millions of records and is suited for analytics workloads. Queries focusing on specific fields, such as calculating the average balance across ten million customers, touch only the relevant column, resulting in faster scans and efficient data compression.\n\nThe choice between row and column storage hinges on the nature of the queries being executed. Row storage shines when queries focus on small writes and touching few columns, while column storage shines when scanning many rows and few columns is the norm. The performance trade-off lies in the balance between the queries' access patterns and the layout's inherent strengths.\n\nRow storage, however, falters under wide analytical scans, as reading vast volumes of irrelevant fields can be inefficient. Teams may try to alleviate this by building separate summary tables, but this is simply a workaround for the inherent mismatch between layout and workload. Columnar storage struggles with high-frequency point updates, as constant small writes across many column files can overwhelm the system and impede query performance. Modern databases often adopt a hybrid approach, maintaining a row-oriented buffer for recent writes while transitioning data into columnar format for analytical reads. The engine intelligently selects the most appropriate layout based on the query's age and access pattern, seamlessly providing both row and column storage capabilities without forcing engineers to make an upfront choice.",
  "summary": "Every database faces the same physical question: when a table is written to disk, what sits next to what? One option keeps all the fields of a single record adjacent, so a row is one contiguous blob. The other keeps one field across many records adjacent, so a column is one contiguous stream. The data is identical; only the arrangement changes. Yet that arrangement decides whether a query touches…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}