arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.24606cs.DB
收藏

列式文件元数据中的零成本NDV估计

Zero-Cost NDV Estimation from Columnar File Metadata

Claude Brisson

AI总结:

本文提出利用现有文件元数据估计列式文件中列的distinct values数量,通过逆向字典编码存储大小方程和统计极值值提供稳健估计,适用于排序或分区数据,适用于查询优化、GPU内存分配和数据分析。

摘要:

我们提出了一种方法,仅使用现有的文件元数据来估计列式文件格式中列的distinct values(NDV)数量,无需额外存储或数据访问。两种互补信号被利用:(1) 逆向字典编码存储大小方程可准确估计当distinct values均匀分布于行组时的NDV;(2) 统计行组内极值值并逆向coupon collector模型可为排序或分区数据提供稳健估计。一个轻量级分布检测器在两个估计器之间路由。尽管在Apache Parquet上演示,该技术可推广到任何具有字典编码和分区统计的格式,如ORC和F3。应用包括基于成本的查询优化、GPU内存分配和数据分析。

英文摘要:

We present a method for estimating the number of distinct values (NDV) of a column in columnar file formats, using only existing file metadata--no extra storage, no data access. Two complementary signals are exploited: (1)~inverting the dictionary-encoded storage size equation yields accurate NDV estimates when distinct values are well-spread across row groups; (2)~counting distinct min/max values across row groups and inverting a coupon collector model provides robust estimates for sorted or partitioned data. A lightweight distribution detector routes between the two estimators. While demonstrated on Apache Parquet, the technique generalizes to any format with dictionary encoding and partition-level statistics, such as ORC and F3. Applications include cost-based query optimization, GPU memory allocation, and data profiling.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑