Search arXiv⌕ Search

arXiv · 2612.05260

SemMV: Materialized Views for Semantic Query Processing over Evolving Data

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Wanting Li, Hengze Lu, Zixin Wei, Shanghao Liu, Yongjun He, Wenqi Jiang. 2026-12-03. SemMV: Materialized Views for Semantic Query Processing over Evolving Data. https://searcharxiv.org/abs/2612.05260

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

ABISS: Evaluating Text-to-SQL Systems Through Agent Interaction

Real-world users frequently pose ambiguous or unanswerable questions that current Large Language Model (LLM)-based Text-to-SQL systems handle poorly. Three interconnected gaps hinder progress: incomplete taxonomies, the lack of scalable generation of realistic benchmark data, and evaluation limited to fixed, idealized conversations. We address these gaps through three contributions: (1) a unified taxonomy of 8 categories covering ambiguous and unanswerable questions; (2) a multi-agent generation pipeline that generates Natural Language Questions (NLQs), grounds them in SQL, and applies a ten-stage validation pipeline with council-based checks; and (3) ABISS (Ambiguity Benchmark using Interaction-Simulated Sessions), a dynamic simulation environment where Text-to-SQL agents interact with style-aware simulated users across multi-turn dialogues. Experiments with ten models, nine of them open-source, on BIRD- and Spider-based datasets reveal two bottlenecks. First, models often fail to recognize that a question is ambiguous, although they usually name its subcategory correctly once they do, and the correct label helps mostly on the questions whose type they miss. Second, models lose most when they answer without asking: once the simulated user supplies the missing information, their SQL is nearly as accurate as when it is given in advance. We release our code and a link to the datasets on GitHub (https://github.com/giosullutrone/ABISS-Evaluating-Text-to-SQL-Systems-Through-Agent-Interaction).

cs.DB↗

Where Should the Vectors Live? Locality-Aware Retrieval for RAG on Geo-Distributed SQL

Enterprise retrieval-augmented generation (RAG) increasingly runs vector search inside geo-distributed SQL databases, where the corpus is fresh, transactional, and subject to data-residency rules. Where the vectors live relative to their users then decides retrieval latency, freshness, and compliance. We compare five placement strategies on a three-region deployment of a commercially available geo-distributed SQL database with emulated wide-area latency and its native vector index: a centralized table, follower reads, a global table, and home-region partitioning searched globally or locally. The workload is 20,963 SQuAD passages with real questions. Approximate nearest neighbor search amplifies network distance: a remote top-10 query costs 4.2 round trips beyond its local cost, so medians span 6.4 ms to over 700 ms (112x) across strategies that differ only in placement. Local strategies pay elsewhere, in staleness, write latency, or missed answers. We propose LARR, a locality-aware retrieval router that searches the home partition first and escalates to a cross-region fan-out only when the best local distance exceeds a calibrated threshold. With 90% of questions issued from the answer's home region, LARR matches the fan-out's hit@10 (70.7% vs. 70.5%; 95% CI of the difference [-1.4, +1.9] points) at 5.9x lower mean latency. The result holds live on held-out questions, with production-style three-node-per-region replication, and on three real cloud regions (6.1x). With a second, transformer-based embedding model, LARR matches the fan-out at 3.5x lower latency, and its throughput advantage persists under concurrent load. A replicated centroid sketch (LARR-S) sharpens escalation when locality is weaker. We also report a pitfall with partitioned vector indexes.

cs.DB↗

Refetch times of AI crawlers: a paired comparison with Googlebot

AI answer engines learn about the web through three types of crawlers: training crawlers collect pages for future models, search crawlers keep the engine's index up-to-date, and user fetchers retrieve a page when a user's prompt triggers it. When a publisher changes a page, an answer engine can show the change only after one of these crawlers fetches the page again. Previous works have analyzed request counts and distinct pages, but none have measured how long a crawler takes to refetch a page. In this work, we measure the refetch time of ten crawlers (including eight AI crawlers) on Prerender customer sites using a Kaplan-Meier survival analysis, and compare it with Googlebot on the same domains in the same months. Googlebot fetched half of its pages again within 13 days on a typical customer's site. AI search crawlers are slower: OpenAI's took 28 days and Perplexity's more than 90. Training crawlers differ by operator, from 6 days for Meta's to 46 for Anthropic's and 66 for OpenAI's. User fetchers come back as often as users ask: OpenAI's took 10 days. A bootstrap and a sign test over customer accounts find these gaps significant, and they survive our robustness checks. We conclude that a change to a page can take weeks longer to reach AI search indexes than to reach Google's, and one and a half to two months to reach OpenAI's and Anthropic's training crawlers, which matters to every publisher whose prices, stock or facts change.

cs.DB↗