CardOOD: Robust Query-driven Cardinality Estimation under Out-of-Distribution

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Rui, Zhao, Kangfei, Yu, Jeffrey Xu, Wang, Guoren
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915053368770560
author Li, Rui
Zhao, Kangfei
Yu, Jeffrey Xu
Wang, Guoren
author_facet Li, Rui
Zhao, Kangfei
Yu, Jeffrey Xu
Wang, Guoren
contents Query-driven learned estimators are accurate, flexible, and lightweight alternatives to traditional estimators in query optimization. However, existing query-driven approaches struggle with the Out-of-distribution (OOD) problem, where the test workload distribution differs from the training workload, leading to performancedegradation. In this paper, we present CardOOD, a general learning framework designed to construct robust query-driven cardinality estimators that are resilient against the OOD problem. Our framework focuses on offline training algorithms that develop one-off models from a static workload, suitable for model initialization and periodic retraining. In CardOOD, we extend classical transfer/robust learning techniques to train query-driven cardinalityestimators, and the algorithms fall into three categories: representation learning, data manipulation, and new learning strategies. As these learning techniques are originally evaluated in computervision tasks, we also propose a new learning algorithm that exploits the property of cardinality estimation. This algorithm, lying in the category of new learning strategy, models the partial order constraint of cardinalities by a self-supervised learning task. Comprehensive experimental studies demonstrate the efficacy of the algorithms of CardOOD in mitigating the OOD problem to varying extents. We further integrate CardOOD into PostgreSQL, showcasing its practical utility in query optimization.
format Preprint
id arxiv_https___arxiv_org_abs_2412_05864
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CardOOD: Robust Query-driven Cardinality Estimation under Out-of-Distribution
Li, Rui
Zhao, Kangfei
Yu, Jeffrey Xu
Wang, Guoren
Databases
Artificial Intelligence
Query-driven learned estimators are accurate, flexible, and lightweight alternatives to traditional estimators in query optimization. However, existing query-driven approaches struggle with the Out-of-distribution (OOD) problem, where the test workload distribution differs from the training workload, leading to performancedegradation. In this paper, we present CardOOD, a general learning framework designed to construct robust query-driven cardinality estimators that are resilient against the OOD problem. Our framework focuses on offline training algorithms that develop one-off models from a static workload, suitable for model initialization and periodic retraining. In CardOOD, we extend classical transfer/robust learning techniques to train query-driven cardinalityestimators, and the algorithms fall into three categories: representation learning, data manipulation, and new learning strategies. As these learning techniques are originally evaluated in computervision tasks, we also propose a new learning algorithm that exploits the property of cardinality estimation. This algorithm, lying in the category of new learning strategy, models the partial order constraint of cardinalities by a self-supervised learning task. Comprehensive experimental studies demonstrate the efficacy of the algorithms of CardOOD in mitigating the OOD problem to varying extents. We further integrate CardOOD into PostgreSQL, showcasing its practical utility in query optimization.
title CardOOD: Robust Query-driven Cardinality Estimation under Out-of-Distribution
topic Databases
Artificial Intelligence
url https://arxiv.org/abs/2412.05864