先掌握传统查询优化器原理
学习现代大模型架构知识
研究查询计划生成的特征工程
参考论文《Learning to Optimize Join Queries With Deep Reinforcement Learning》
实践Postgres查询计划分析工具EXPLAIN
06给 Codex 的 Prompt
Create a step-by-step workflow to implement an AI query optimizer that: 1) intercepts SQL queries, 2) generates multiple candidate plans using a trained model, 3) selects the optimal plan based on cost estimation, 4) executes through the database engine. Include performance benchmarking against traditional optimizers.