JOURNAL ARTICLE

SQLess: Dialect-Agnostic SQL Query Simplification

Abstract

Database Management Systems (DBMSs) are fundamental to numerous enterprise applications. Due to the significance of DBMSs, various testing techniques have been proposed to detect DBMS bugs. However, to trigger deep bugs, most of the existing techniques focus on generating lengthy and complex queries which burdens developers with the difficult of debugging. Therefore, SQL query simplification, which aims to reduce lengthy SQL queries without compromising their ability to detect bugs, is highly demanded. To bridge this gap, we introduce SQLess, an innovative approach that employs a dialect-agnostic method for efficient and semantically correct SQL query simplification tailored for various DBMSs. Unlike previous works that have to depend on DBMS-specific grammar, SQLess utilizes an adaptive parser, which leverages error recovery and grammar expansion to support DBMS dialects. Moreover, SQLess performs a semantics-sensitive SQL query trimming, which leverages alias and dependency analysis to simplify SQL queries with preserving bug-triggering capability. We evaluate SQLess using two datasets from the state-of-theart database bug detection studies, encompassing six widely-used DBMSs and over 32,000 complex SQL queries. The results demonstrate SQLess's superior performance: it achieves an average simplification rate of 72.45%, which significantly outperforms the stateof-the-art approaches by 84.91%.

Keywords:
Computer science Query by Example SQL SQL/PSM Programming language Query optimization Query language Stored procedure Language Integrated Query Database Sargable Information retrieval Web search query Search engine

Metrics

1
Cited By
1.06
FWCI (Field Weighted Citation Impact)
14
Refs
0.70
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Software Testing and Debugging Techniques
Physical Sciences →  Computer Science →  Software
Software Engineering Research
Physical Sciences →  Computer Science →  Information Systems
Software Reliability and Analysis Research
Physical Sciences →  Computer Science →  Software

Related Documents

JOURNAL ARTICLE

LLM-Assisted Dialect-Agnostic SQL Query Parsing

Junwen An

Year: 2025 Pages: 31-33
JOURNAL ARTICLE

Query simplification

Thomas Neumann

Year: 2009 Pages: 403-414
JOURNAL ARTICLE

Query-Efficient Target-Agnostic Black-Box Attack

Raha MoraffahHuan Liu

Journal:   2022 IEEE International Conference on Data Mining (ICDM) Year: 2022 Pages: 368-377
BOOK-CHAPTER

Schema-Agnostic Query Rewriting in SPARQL 1.1

Stefan BischofMarkus KrötzschAxel PolleresSebastian Rudolph

Lecture notes in computer science Year: 2014 Pages: 584-600
© 2026 ScienceGate Book Chapters — All rights reserved.