Day 311 — Parquet, partitioning, and only reading what you need
Sunday, 13 June 2027 · Week 45 of 52 · Production · Study day · 60 min
Columnar storage with predicate pushdown means a well-designed layout reads a fraction of the bytes, and the difference between a good and a bad partitioning is a factor you measured last night.
What you should be able to do tonight
- Explain predicate pushdown and column pruning, and demonstrate both with measured bytes read.
- Choose a partitioning scheme for your own store and defend it against the query pattern.
Tasks 60 min
30 min Measure the two mechanisms separately: read one column of one year from a partitioned dataset, then all columns of one year, then one column of all years. The three byte counts show pruning and pushdown independently, and having seen them you will stop guessing about layout.
30 min Choose and implement a partitioning scheme, then check the failure mode: too many small partitions makes metadata dominate. Report the file count, the average file size, and the query time across three schemes, and pick from the measurements.
Resources
- PyArrow documentation tool
- DuckDB documentation tool
Deliverable
Bytes read measured for three access patterns, and a partitioning scheme chosen from a three-way comparison.
Checkpoint
You partition by symbol and get 5,000 tiny files. What went wrong, and what would you do instead?
Prepare for tomorrow
Ten minutes tonight so Day 312, Monday, 14 June 2027 starts clean. This is what the evening email sends you.
Profile your slowest pipeline step with cProfile and save the output.
Look at the top five entries by cumulative time.
Write down where you thought the time was going before you looked.