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即使无需重新训练也能维持令人满意的精度,缩小了基于学习的估计器与实际系统之间的差距。