Speculative Ad-hoc Querying

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Li, Haoyu, Kandula, Srikanth, Balaguer, Maria Angels de Luis, Akella, Aditya, Arun, Venkat
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913714279546880
author Li, Haoyu
Kandula, Srikanth
Balaguer, Maria Angels de Luis
Akella, Aditya
Arun, Venkat
author_facet Li, Haoyu
Kandula, Srikanth
Balaguer, Maria Angels de Luis
Akella, Aditya
Arun, Venkat
contents Analyzing large datasets requires responsive query execution, but executing SQL queries on massive datasets can be slow. This paper explores whether query execution can begin even before the user has finished typing, allowing results to appear almost instantly. We propose SpeQL, a system that leverages Large Language Models (LLMs) to predict likely queries based on the database schema, the user's past queries, and their incomplete query. Since exact query prediction is infeasible, SpeQL speculates on partial queries in two ways: 1) it predicts the query structure to compile and plan queries in advance, and 2) it precomputes smaller temporary tables that are much smaller than the original database, but are still predicted to contain all information necessary to answer the user's final query. Additionally, SpeQL continuously displays results for speculated queries and subqueries in real time, aiding exploratory analysis. A utility/user study showed that SpeQL improved task completion time, and participants reported that its speculative display of results helped them discover patterns in the data more quickly. In the study, SpeQL improves user's query latency by up to $289\times$ and kept the overhead reasonable, at $\$4$ per hour.
format Preprint
id arxiv_https___arxiv_org_abs_2503_00714
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Speculative Ad-hoc Querying
Li, Haoyu
Kandula, Srikanth
Balaguer, Maria Angels de Luis
Akella, Aditya
Arun, Venkat
Databases
Artificial Intelligence
Human-Computer Interaction
Machine Learning
Multiagent Systems
Analyzing large datasets requires responsive query execution, but executing SQL queries on massive datasets can be slow. This paper explores whether query execution can begin even before the user has finished typing, allowing results to appear almost instantly. We propose SpeQL, a system that leverages Large Language Models (LLMs) to predict likely queries based on the database schema, the user's past queries, and their incomplete query. Since exact query prediction is infeasible, SpeQL speculates on partial queries in two ways: 1) it predicts the query structure to compile and plan queries in advance, and 2) it precomputes smaller temporary tables that are much smaller than the original database, but are still predicted to contain all information necessary to answer the user's final query. Additionally, SpeQL continuously displays results for speculated queries and subqueries in real time, aiding exploratory analysis. A utility/user study showed that SpeQL improved task completion time, and participants reported that its speculative display of results helped them discover patterns in the data more quickly. In the study, SpeQL improves user's query latency by up to $289\times$ and kept the overhead reasonable, at $\$4$ per hour.
title Speculative Ad-hoc Querying
topic Databases
Artificial Intelligence
Human-Computer Interaction
Machine Learning
Multiagent Systems
url https://arxiv.org/abs/2503.00714