In the early 2000s, users of database-centric web applications—such as flight search engines or real estate portals—frequently encountered the frustrating "zero results found" screen. When a search was too restrictive, users were forced into a tedious trial-and-error process, manually adjusting parameters like price or date until enough options appeared. This paper, published in 2003, introduces SAUNA (Stretch A User query to get N Answers), a framework designed to automate this relaxation process, improving both user experience and server efficiency.
The Problem: The Cost of Empty Results
Exploratory queries are difficult because users often do not know the underlying data distribution. An initial search for a flight within a specific two-hour window might return nothing, not because there are no flights that day, but because the specific window is too narrow.
This "empty result" problem has two major drawbacks:
- User Friction: Manual query adjustment leads to high latency. This was particularly acute for mobile users in 2003, who dealt with slow connections and limited device power.
- Server Load: Each manual adjustment is a new, separate request. These redundant queries often force the server to duplicate work, reducing overall system throughput.
While prior research addressed "too many results" (Top-K queries), SAUNA focuses on the more complex task of relaxing multi-dimensional range queries involving multiple simultaneous constraints.
The SAUNA Framework
When a user’s initial query $Q^I$ returns fewer than a desired number of results $N$, SAUNA automatically calculates a "relaxed" query box $Q^R$ expected to contain at least $N$ answers.
To achieve this, SAUNA utilizes multi-dimensional equi-depth histograms to estimate data density. Because histograms are summaries, they provide estimates rather than exact counts. To manage the risk of under-estimation (which requires a costly query restart), the authors developed a Box-Dynamic strategy. This approach balances optimistic estimates with conservative "over-stretching" to minimize the total cost of query execution.
Technical Innovations
SAUNA introduces several novel concepts to ensure the relaxed query remains faithful to the user's original intent:
Periphery-Based Distance
Unlike standard point queries that measure distance from a single center, SAUNA measures distance from the edges (periphery) of the user's query box. This respects the spatial structure of the original range query, treating any point inside the initial box as having a distance of zero.
Aspect-Ratio Preservation
The algorithm assumes that the dimensions of the initial query box reflect user preferences. For example, if a user searches for a 1-hour flight window but a $20,000 price range, they are likely less flexible on time than on price. SAUNA weights the relaxation so the "stretched" query maintains the same proportions as the original.
Experimental Results
The authors evaluated SAUNA using real-world datasets (US Census and Forest data) and synthetic distributions (Gaussian and Zipfian). The results demonstrated significant improvements over manual methods:
- Efficiency: SAUNA typically processed less than 4% of the total database tuples to satisfy a request.
- Performance: Execution times were consistently below 10% of a full sequential scan. Compared to a simulated manual user widening their search by 20% increments, SAUNA was 2 to 11 times faster.
- Scalability: Even with a minimal memory budget for statistics (as low as 5KB for histograms), SAUNA provided high-quality relaxations. Increasing the budget to 100KB brought performance very close to a theoretical "Optimal" strategy.
Conclusion and Future Work
SAUNA successfully automates the relaxation of range queries, significantly reducing the "trial-and-error" burden on users. While highly effective, the authors noted that the system's performance is dependent on the accuracy of its histograms. Future work suggested "query splitting"—executing only the difference between the initial and relaxed boxes—to further optimize performance and reduce redundant data processing.
Summary updated