Abstract
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 289times and kept the overhead reasonable, at 4$ per hour.
Community
Precompute the query result while the user is typing, even before the user submits their query.
https://github.com/lihy0529/SpeQL
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Intra-Query Runtime Elasticity for Cloud-Native Data Analysis (2025)
- ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Format Restriction, and Column Exploration (2025)
- Can Large Language Models Be Query Optimizer for Relational Databases? (2025)
- Learned Offline Query Planning via Bayesian Optimization (2025)
- Query Rewriting via LLMs (2025)
- Improving DBMS Scheduling Decisions with Fine-grained Performance Prediction on Concurrent Queries - Extended (2025)
- Skyrise: Exploiting Serverless Cloud Infrastructure for Elastic Data Processing (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper