Zero-Cost NDV Estimation from Columnar File Metadata

Fuente: arXiv
Saved in:
Bibliographic Details
Main Author: Brisson, Claude
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911545008586752
author Brisson, Claude
author_facet Brisson, Claude
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_24606
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Zero-Cost NDV Estimation from Columnar File Metadata
Brisson, Claude
Databases
68P15
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.
title Zero-Cost NDV Estimation from Columnar File Metadata
topic Databases
68P15
url https://arxiv.org/abs/2603.24606