Row vs Columnar Storage
If you donβt understand Row vs Columnar Storage, you donβt understand why data warehouses are fast.
π This is a fundamental storage decision:
- Row Storage β Store data row by row
- Columnar Storage β Store data column by column
What is Row-Based Storage?β
Row-Based Storage means:
- Entire row is stored together
- All column values of a record are stored sequentially
Examplesβ
- OLTP databases
- Traditional relational systems
Key Ideaβ
π Optimized for writes and transactions
Row Storage Exampleβ
Row1: (id, name, age)
Row2: (id, name, age)
Row3: (id, name, age)
What is Columnar Storage?β
Columnar Storage means:
- Data is stored column by column
- Each column stored separately
Examplesβ
- Parquet
- ORC
- Data warehouses