A Unified Model for Cardinality Estimation by Learning from Data and Queries via Sum-Product Networks

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Jiawei, Fan, Ju, Liu, Tongyu, Zeng, Kai, Wang, Jiannan, Liu, Quehuan, Ye, Tao, Tang, Nan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910941375889408
author Liu, Jiawei
Fan, Ju
Liu, Tongyu
Zeng, Kai
Wang, Jiannan
Liu, Quehuan
Ye, Tao
Tang, Nan
author_facet Liu, Jiawei
Fan, Ju
Liu, Tongyu
Zeng, Kai
Wang, Jiannan
Liu, Quehuan
Ye, Tao
Tang, Nan
contents Cardinality estimation is a fundamental component in database systems, crucial for generating efficient execution plans. Despite advancements in learning-based cardinality estimation, existing methods may struggle to simultaneously optimize the key criteria: estimation accuracy, inference time, and storage overhead, limiting their practical applicability in real-world database environments. This paper introduces QSPN, a unified model that integrates both data distribution and query workload. QSPN achieves high estimation accuracy by modeling data distribution using the simple yet effective Sum-Product Network (SPN) structure. To ensure low inference time and reduce storage overhead, QSPN further partitions columns based on query access patterns. We formalize QSPN as a tree-based structure that extends SPNs by introducing two new node types: QProduct and QSplit. This paper studies the research challenges of developing efficient algorithms for the offline construction and online computation of QSPN. We conduct extensive experiments to evaluate QSPN in both single-table and multi-table cardinality estimation settings. The experimental results have demonstrated that QSPN achieves superior and robust performance on the three key criteria, compared with state-of-the-art approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2505_08318
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle A Unified Model for Cardinality Estimation by Learning from Data and Queries via Sum-Product Networks
Liu, Jiawei
Fan, Ju
Liu, Tongyu
Zeng, Kai
Wang, Jiannan
Liu, Quehuan
Ye, Tao
Tang, Nan
Databases
H.2.4; E.5
Cardinality estimation is a fundamental component in database systems, crucial for generating efficient execution plans. Despite advancements in learning-based cardinality estimation, existing methods may struggle to simultaneously optimize the key criteria: estimation accuracy, inference time, and storage overhead, limiting their practical applicability in real-world database environments. This paper introduces QSPN, a unified model that integrates both data distribution and query workload. QSPN achieves high estimation accuracy by modeling data distribution using the simple yet effective Sum-Product Network (SPN) structure. To ensure low inference time and reduce storage overhead, QSPN further partitions columns based on query access patterns. We formalize QSPN as a tree-based structure that extends SPNs by introducing two new node types: QProduct and QSplit. This paper studies the research challenges of developing efficient algorithms for the offline construction and online computation of QSPN. We conduct extensive experiments to evaluate QSPN in both single-table and multi-table cardinality estimation settings. The experimental results have demonstrated that QSPN achieves superior and robust performance on the three key criteria, compared with state-of-the-art approaches.
title A Unified Model for Cardinality Estimation by Learning from Data and Queries via Sum-Product Networks
topic Databases
H.2.4; E.5
url https://arxiv.org/abs/2505.08318