3.6. Row and Column Storage

There two basic ways to put a table into storage. The row storage approaches put the rows into contiguous physical locations, much like the traditional record and file systems. The database engine then extracts the columns needed for each query. The column storage approaches put the data into the database in columns and assemble the rows.

3.6.1. Row-Based Storage

Row-based storage holds the data in rows, so that you can find all the columns in one operation. The trade-off is that you have to work with a whole row at once and not just the columns you need.

However, this makes queries based on two or more columns for the same entity faster, and it improves the speed of updates, inserts, and deletes.

Row-based storage ...

Get Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.