错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

MoEPlan: A Lazy Learned Query-Selection Optimizer via Mixture of Optimizer Experts

  • Suchen Liu,
  • Jun Gao,
  • Yinjun Han,
  • Yang Lin

摘要

The learned plan-selection optimizers, which generate diverse candidate plans via different traditional optimizers and then select the best expected performance plan using a learned value model, can achieve stable and relatively efficient performance by combining the advantages of conventional and learned methods. However, these eagerly-generated plans incur high optimization overhead, as they require multiple invocations of the native optimizer. In this paper, we propose MoEPlan, a method that learns a routing policy to select the top- k experts (different optimizers) by directly matching query embedding and expert embeddings, without needing to explicitly obtain execution plans from each expert in advance. MoEPlan also incorporates a virtual ideal expert, which is trained independently and guides the selection of the best plan of the top-k experts through learned plan similarities. Experimental studies demonstrate that MoEPlan, with only two plans generated, takes less inference time, while still producing more efficient plans than other learned plan-selection optimizers.