Columnar storage (Parquet, ClickHouse)
Storing a table column by column instead of row by row, so analytics that read a few columns over many rows are fast and compress well.
A typical application database stores each row together, which is ideal for “load this order with all its fields”. Analytics asks the opposite: “sum one column over a hundred million rows”. Columnar storage keeps each column in its own block, so such a query reads only the columns it needs. Values in a column are similar, so they compress very well, and engines process them in batches.
The Apache Parquet file format, warehouses such as BigQuery, Snowflake and Redshift, and analytics databases such as ClickHouse and DuckDB are all columnar. Product analytics tools run on such engines, which is how they count events across months in seconds.
The weakness is the transactional workload: updating one row touches many column blocks, and fetching one full record means gathering it from all columns. The usual setup keeps the app on a row-based database such as Postgres and copies data to a columnar store for reporting.
Sources
- Apache Parquet: Documentation parquet.apache.org
- DuckDB: Why DuckDB duckdb.org
Related terms
- Database index: An extra data structure a database keeps next to a table so it can find matching rows without reading the whole table.
- HyperLogLog: A tiny sketch that estimates how many distinct items a stream has, such as unique visitors, with a small known error and fixed memory.
- B-tree: A sorted, wide and shallow tree that stores keys in disk-sized pages; the default index in most relational databases.
- Retention: The share of users who come back and use a product again in later weeks or months, usually shown per sign-up cohort.
