Dolt's go-mysql-server at Five: A Query's Journey
2025-04-27

This post reflects on five years of Dolt using go-mysql-server, detailing the inner workings of its SQL engine. It walks through a query's journey from parsing to result spooling, encompassing parsing, binding, plan simplification, join exploration, cost-based optimization, and execution. Dolt employs a left-recursive parser and bottom-up dynamic programming for query plan optimization, selecting the optimal execution strategy using a cost model. The post also discusses memory management and future optimizations, such as unifying intermediate representations and reducing memory churn.
Development