Refactoring a Decade-Old Query Optimizer: Architecture, DIFF Fixes, Performance Gains, and Stability Improvements
Tencent engineers completely rewrote a ten‑year‑old query optimizer, shrinking the codebase by 80% and replacing its monolithic thread‑pool with a tRPC‑Fiber DAG scheduler, which cut latency by 28%, reduced startup time to five minutes, saved 40 GB memory, boosted throughput 12%, fixed numerous stability bugs, raised test coverage above 60%, and accelerated new‑feature lead time to under a day.