Database / DuckDB Interview questions
What is a row group in DuckDB's storage format?
A row group is a horizontal partition of a table, a contiguous set of rows, stored and compressed together as a unit within DuckDB's on-disk columnar storage format, conceptually similar to Parquet's own row-group structure.
Each row group stores its columns' data compressed and, importantly, keeps summary statistics (like min/max values) for each column within that row group. This is what enables DuckDB's query engine to skip entire row groups during a scan when a query's filter conditions make it provably impossible for that row group to contain any matching rows, without needing to decompress or read the actual data inside it at all.
This row-group-level pruning, combined with columnar storage's ability to skip irrelevant columns entirely, is a major part of why DuckDB can scan large tables quickly for selective queries: much of the actual stored data on disk never needs to be touched at all for a query with a reasonably selective filter.
More Related questions...