SAP / SAP Mid Level (3 to 8 yrs) Interview questions
What is columnar storage and how does it differ from row-based storage?
Columnar storage physically groups all values belonging to one column together on disk/in memory, rather than grouping all fields of one row together the way row-based storage does — a fundamental reordering of how the same logical table data is laid out physically.
flowchart TD
subgraph RowStore["Row Store"]
R1[Row1: id=1,name=Ada,age=34]
R2[Row2: id=2,name=Grace,age=41]
end
subgraph ColStore["Column Store"]
C1[id column: 1,2]
C2[name column: Ada,Grace]
C3[age column: 34,41]
end
The practical consequence: a query needing only the age column can read just that one
contiguous block of data in column store, while row store would need to touch every row's full data to
extract that same single field. This reordering is specifically optimized for read-heavy, few-columns-many-rows
analytical access, at some cost to the efficiency of writing or reading one complete row at a time.
More Related questions...
