LEARNT: A Practical Estimator for Cardinality of LIKE Queries with Formal Accuracy Guarantees

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Lan, Hai, Bao, Zhifeng, Srivastava, Divesh, Huang, Shixun, Peng, Yuwei, Yu, Yang
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910250879156224
author Lan, Hai
Bao, Zhifeng
Srivastava, Divesh
Huang, Shixun
Peng, Yuwei
Yu, Yang
author_facet Lan, Hai
Bao, Zhifeng
Srivastava, Divesh
Huang, Shixun
Peng, Yuwei
Yu, Yang
contents We study the problem of cardinality estimation for LIKE queries on string data, focusing on the most common patterns in real workloads: prefix, suffix, and substring queries. We propose LEARNT, a LIKE query Estimator with Accuracy, Robustness, Negligible overhead, Tunability, and Theoretical guarantees. LEARNT formulates estimation as a bucket-classification problem, and upon correct classification, it yields formal bounds on Q-error for the queries with non-empty answer. It employs a memory-efficient bucketed layered-filter architecture with Bloom filters and compact auxiliary tables, together with optimizations that exploit query skew to reduce storage. For the queries that have empty answer, LEARNT incorporates dedicated filter-based and prefix-walk strategies, providing probabilistic guarantees on correct identification. Furthermore, to support arbitrarily long query strings, we extend LEARNT with Markov modeling scheme that composes short-query statistics into estimates for longer queries. A theoretical framework guides parameter selection to minimize storage under accuracy and robustness constraints. Extensive experiments on four real-world datasets show that LEARNT consistently outperforms state-of-the-art methods such as CLIQUE and LPLM, achieving 1.3-1.7x lower mean Q-error, significantly lower tail errors, and up to 70x faster construction with comparable memory usage.
format Preprint
id arxiv_https___arxiv_org_abs_2605_24308
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LEARNT: A Practical Estimator for Cardinality of LIKE Queries with Formal Accuracy Guarantees
Lan, Hai
Bao, Zhifeng
Srivastava, Divesh
Huang, Shixun
Peng, Yuwei
Yu, Yang
Databases
We study the problem of cardinality estimation for LIKE queries on string data, focusing on the most common patterns in real workloads: prefix, suffix, and substring queries. We propose LEARNT, a LIKE query Estimator with Accuracy, Robustness, Negligible overhead, Tunability, and Theoretical guarantees. LEARNT formulates estimation as a bucket-classification problem, and upon correct classification, it yields formal bounds on Q-error for the queries with non-empty answer. It employs a memory-efficient bucketed layered-filter architecture with Bloom filters and compact auxiliary tables, together with optimizations that exploit query skew to reduce storage. For the queries that have empty answer, LEARNT incorporates dedicated filter-based and prefix-walk strategies, providing probabilistic guarantees on correct identification. Furthermore, to support arbitrarily long query strings, we extend LEARNT with Markov modeling scheme that composes short-query statistics into estimates for longer queries. A theoretical framework guides parameter selection to minimize storage under accuracy and robustness constraints. Extensive experiments on four real-world datasets show that LEARNT consistently outperforms state-of-the-art methods such as CLIQUE and LPLM, achieving 1.3-1.7x lower mean Q-error, significantly lower tail errors, and up to 70x faster construction with comparable memory usage.
title LEARNT: A Practical Estimator for Cardinality of LIKE Queries with Formal Accuracy Guarantees
topic Databases
url https://arxiv.org/abs/2605.24308