We present FasCo, a simple yet effective learning-based estimator for the cost of executing a database query plan. FasCo uses significantly shorter training time and a lower inference cost than the state-of-the-art approaches, while achieving higher estimation accuracy. The effectiveness of FasCo comes from embedding abundant explicit execution-plan-based features and incorporating a novel technique called cardinality calibration. Extensive experimental results show that FasCo achieves orders of magnitude higher efficiency than the state-of-the-art methods: on the JOB-M benchmark dataset, it cuts off training plans by 98\%, reducing training time from more than two days to about eight minutes while entailing better accuracy. Furthermore, in dynamic environments, FasCo can maintain satisfactory accuracy even without retraining, narrowing the gap between learning-based estimators and real systems.
翻译:我们提出了FasCo,一种简单而有效的学习估算器,用于执行数据库查询计划的成本。FasCo使用比最先进的方法更短的训练时间和更低的推理成本,同时实现更高的估计精度。FasCo的有效性来自于嵌入丰富的基于执行计划的显示特征,并结合了一种称为基数校准的新技术。广泛的实验结果表明,FasCo实现了比最先进的方法高出几个数量级的效率:在JOB-M基准数据集上,它将训练计划减少了98%,从两天多的训练时间缩短到约八分钟,同时带来更好的准确性。此外,在动态环境中,FasCo即使不重新训练,也可以保持令人满意的准确性,缩小了学习估算器和实际系统之间的差距。