English

Semantic Caching for OLAP via LLM-Based Query Canonicalization (Extended Version)

Databases 2026-02-24 v1

Abstract

Analytical workloads exhibit substantial semantic repetition, yet most production caches key entries by SQL surface form (text or AST), fragmenting reuse across BI tools, notebooks, and NL interfaces. We introduce a safety-first middleware cache for dashboard-style OLAP over star schemas that canonicalizes both SQL and NL into a unified key space -- the OLAP Intent Signature -- capturing measures, grouping levels, filters, and time windows. Reuse requires exact intent matches under strict schema validation and confidence-gated NL acceptance; two correctness-preserving derivations (roll-up, filter-down) extend coverage without approximate matching. Across TPC-DS, SSB, and NYC TLC (1,395 queries), we achieve 82% hit rate versus 28% (text) and 56% (AST) with zero false hits; derivations double hit rate on hierarchical queries.

Keywords

Cite

@article{arxiv.2602.19811,
  title  = {Semantic Caching for OLAP via LLM-Based Query Canonicalization (Extended Version)},
  author = {Laurent Bindschaedler},
  journal= {arXiv preprint arXiv:2602.19811},
  year   = {2026}
}

Comments

12 pages, 2 figures, 5 tables. Extended version of the short paper published at DOLAP 2026 (co-located with EDBT/ICDT 2026)

R2 v1 2026-07-01T10:47:20.691Z