Writing a Query Optimizer: From COLUMBIA to TPC-H
Query optimizers are the component everyone uses and few people write. You can recite Join Order, subquery unnesting and cost models in an interview — but actually writing an optimizer that survives all 22 TPC-H queries teaches you that the hard part isn’t the vocabulary. It’s the way the details constrain each other. This series is a record of one such attempt: from porting a textbook Cascades implementation, to making it digest TPC-H, to admitting the traps it fell into. ...