SemMV: Materialized Views for Semantic Query Processing over Evolving Data

Semantic query processing extends databases with semantic predicates evaluated by large language models (LLMs). Since LLM inference dominates the cost of semantic queries, existing systems employ various query optimization strategies to reduce this cost. Optimizing queries in isolation, however, overlooks redundant LLM calls across related queries that repeatedly access incrementally changing data. Exploiting this redundancy poses three challenges: determining which prior results can be reused, efficiently evaluating the rows those results leave undecided, and deciding when to refresh stored results as data change. In this paper, we present SemMV, a system that reduces semantic query processing cost by reusing prior results through materialized views. Specifically, SemMV comprises four components to address the aforementioned challenges. First, the validator conservatively judges relations between predicates to reduce the risk of incorrect reuse. Second, the query rewriter translates these relations into execution plans that reuse stored decisions to eliminate redundant LLM calls. Third, the two-sided scan algorithm reduces LLM calls on undecided rows, stopping when estimated precision and recall reach the specified target. Fourth, the maintenance manager proactively refreshes a view only when the expected savings from its reuse outweigh the refresh cost. Experiments on various real-world datasets and query workloads show that SemMV achieves a 57% reduction in total LLM calls and a 40% reduction in average query latency compared with re-executing every query, while keeping recall and precision against reference labels within 1% of the re-execution baseline.

Authors

Institutions

Publication Details

Journal
arXiv
Published
2026-12-03
Primary Topic
Advanced Database Systems and Queries
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

SemMV: Materialized Views for Semantic Query Processing over Evolving Data

Yongjun He, Zixin Wei, Wanting Li, Shanghao Liu et al.
arXiv
Advanced Database Systems and Queries
preprint

SemMV: Materialized Views for Semantic Query Processing over Evolving Data

Yongjun He, Zixin Wei, Wanting Li, Shanghao Liu, Wenqi Jiang, Hengze Lu
preprint en

Abstract

Semantic query processing extends databases with semantic predicates evaluated by large language models (LLMs). Since LLM inference dominates the cost of semantic queries, existing systems employ various query optimization strategies to reduce this cost. Optimizing queries in isolation, however, overlooks redundant LLM calls across related queries that repeatedly access incrementally changing data. Exploiting this redundancy poses three challenges: determining which prior results can be reused, efficiently evaluating the rows those results leave undecided, and deciding when to refresh stored results as data change. In this paper, we present SemMV, a system that reduces semantic query processing cost by reusing prior results through materialized views. Specifically, SemMV comprises four components to address the aforementioned challenges. First, the validator conservatively judges relations between predicates to reduce the risk of incorrect reuse. Second, the query rewriter translates these relations into execution plans that reuse stored decisions to eliminate redundant LLM calls. Third, the two-sided scan algorithm reduces LLM calls on undecided rows, stopping when estimated precision and recall reach the specified target. Fourth, the maintenance manager proactively refreshes a view only when the expected savings from its reuse outweigh the refresh cost. Experiments on various real-world datasets and query workloads show that SemMV achieves a 57% reduction in total LLM calls and a 40% reduction in average query latency compared with re-executing every query, while keeping recall and precision against reference labels within 1% of the re-execution baseline.

arXiv
National University of Singapore (SG), ETH Zurich (CH)
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon