SAP / SAP Mid Level (3 to 8 yrs) Interview questions
Explain how columnar storage improves aggregation query performance?
An aggregation like SUM(amount) GROUP BY region only needs to touch two columns:
amount and region. Because columnar storage keeps each column's values contiguous
and separate from every other column, HANA can scan just those two columns directly, entirely skipping every
other field the table might have (customer notes, timestamps, addresses, whatever else exists), which a
row-oriented layout couldn't avoid reading.
flowchart TD
A[GROUP BY region, SUM amount] --> B[Scan only 'region' column - contiguous block]
A --> C[Scan only 'amount' column - contiguous block]
B --> D[Combine and aggregate per group]
C --> D
Combined with compression (scanning a compressed column is both less data to read and faster to process) and parallel execution across CPU cores, this selective-column-scan advantage is the core reason columnar storage dramatically outperforms row storage specifically for the aggregate-heavy, wide-table, few-columns pattern typical of business reporting and analytics.
More Related questions...
