Supporting Incremental Join Queries on Ranked Inputs

Apostol Natsev, Yuan-Chi Chang, John R. Smith, Chung-Sheng Li, Jeffrey Scott VitterVLDB 2001

Introduction

Modern multimedia and decision-support systems frequently handle queries that return results ranked by similarity scores. A significant challenge arises when users need to combine these ranked results using complex, non-equi-join conditions. For instance, a geologist might search for images where "Rock Sample A" is positioned "on top of" "Rock Sample B." Traditional join algorithms, optimized for exact matches on unique identifiers, are ill-suited for these "fuzzy" spatial or content-based relationships.

Example of a multimedia query template for finding specific rock structures.

Existing methods like Fagin’s algorithm often require random access via unique keys or struggle with nested joins where the output of one join serves as the input to another. To address these limitations, this paper introduces $J^*$, an incremental algorithm that treats the join process as an $A^*$ search problem, enabling efficient top-$k$ queries over ranked data streams without requiring unique join keys.

The $J^*$ Algorithm

The core innovation of $J^*$ is reframing the database join as a state-space search. By leveraging the monotonicity of score functions, the algorithm can aggressively prune the search space, focusing only on the most promising combinations.

The $J^*$ framework utilizes a middleware to pull data from multiple ranked streams ($S_1 \dots S_m$) based on query predicates.

Key Methodological Components:

  • State-Space Search: $J^*$ maintains a priority queue of partial and complete join combinations. Each state is assigned a "potential" score, representing an upper bound on the final score of any solution derived from it.
  • Pull Model: Unlike traditional "push" models that scan data linearly, $J^*$ uses a "pull" approach. It requests the next tuple from an input stream only when that stream is part of the most promising partial solution at the head of the queue.
  • Predicate Access ($J^*_{PA}$): This variation exploits database indexes. When a partial match is identified, the algorithm can "jump" to relevant tuples in other streams that satisfy the join predicate, significantly reducing scan time.
  • Iterative Deepening and Approximation: To manage memory, the authors incorporate iterative deepening. Furthermore, an $\epsilon$-approximation version allows for faster results by stopping when current matches are guaranteed to be within a factor of $(1+\epsilon)$ of the true optimum.

Evaluation and Key Insights

The authors evaluated $J^*$ using synthetic datasets of up to 100,000 tuples across various score distributions (e.g., uniform, exponential decay). The results demonstrate that $J^*$ is highly efficient, often scanning only a tiny fraction of the data to identify the top-$k$ results.

A major theoretical contribution is the proof that $J^*$ with iterative deepening is instance-optimal. This means that for any specific database instance, the algorithm's performance is within a constant factor of the best possible algorithm for that specific data. Additionally, the "greedy" approximation was found to reduce memory usage by 40% and database access costs by 5–10% with minimal impact on result quality.

Conclusion and Future Directions

$J^*$ provides a robust framework for complex joins in ranked environments, particularly where unique keys are absent. While highly effective, future work could address memory overhead for very large $k$ values and explore the impact of correlated data streams, which might affect pruning efficiency. Nonetheless, by treating joins as a search problem, $J^*$ offers a powerful tool for next-generation multimedia retrieval and decision-support systems.

Summary updated

BibTeX
@inproceedings{natsev2001supporting,
  author = {Apostol Natsev and Yuan-Chi Chang and John R. Smith and Chung-Sheng Li and Jeffrey Scott Vitter},
  title = {{Supporting Incremental Join Queries on Ranked Inputs}},
  booktitle = {VLDB},
  year = {2001},
}
Figure