Home avatar

Stay Hungry Stay Foolish

Paper Reading: Zero-Shot Cost Models for Out-of-the-Box Learned Cost Prediction [VLDB 2022]

Zero-Shot Cost Models for Out-of-the-box Learned Cost Prediction [VLDB 2022]

Abstract

本文介绍了 zero-shot cost model,该模型可以使学习的成本估算能够 generalizes to unseen databases。与最 state-of-the-art 的工作负载驱动的方法相反,这些方法不必在每个新数据基础上执行大量 training queries ,zero-shot cost models thus allow to instantiate a learned cost model out-of-the-box without expensive training data collection。为了 zero-shot cost models,本文提出 a new learning paradigm based on pre-trained cost models。As core contributions to support the transfer of such a pre-trained cost model to unseen databases, we introduce a new model architecture and representation technique for encoding query workloads as input to those models. As we will show in our evaluation, zero-shot cost estimation can provide more accurate cost estimates than state-of-the-art models for a wide range of (real-world) databases without requiring any query executions on unseen databases. Furthermore, we show that zero-shot cost models can be used in a few-shot mode that further improves their quality by retraining them just with a small number of additional training queries on the unseen database.