Lune

SIGMOD2020Top-tier venue

A Method for Optimizing Opaque Filter Queries

Wenjia He, Michael R. Anderson, Maxwell Strome, Michael J. Cafarella

Abstract

An important class of database queries in machine learning and data science workloads is the opaque filter query: a query with a selection predicate that is implemented with a UDF, with semantics that are unknown to the query optimizer. Some typical examples would include a CNN-style trained image classifier, or a textual sentiment classifier. Because the optimizer does not know the predicate's semantics, it cannot employ standard optimizations, yielding long query times. We propose voodoo indexing, a two-phase method for optimizing opaque filter queries. Before any query arrives, the method builds a hierarchical "query-independent" index of the database contents, which groups together similar objects. At query-time, the method builds a map of how much each group satisfies the predicate, while also exploiting the map to accelerate execution. Unlike past methods, voodoo indexing does not require insight into predicate semantics, works on any data type, and does not require in-query model training. We describe both standalone and SparkSQL-specific implementations, plus experiments on both image and text data, on more than 100 distinct opaque predicates. We show voodoo indexing can yield up to an 88% improvement over standard scan behavior, and a 79% improvement over the previous best method adapted from research literature.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

10 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Extract-Transform-Load for Video Streams cites Optimizing Video Analytics with Declarative Model Relationships
  • Extract-Transform-Load for Video Streams cites SEIDEN: Revisiting Query Processing in Video Database Systems
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. Transformer with Memory ReplayRui Liu, Barzan MozafariAAAI 2022 · 85 citations
  2. Optimizing Video Analytics with Declarative Model RelationshipsFrancisco Romero, Johann Hauswald, Aditi Partap, Daniel Kang et al.VLDB 2023 · 37 citations
  3. Procedural Extensions of SQL: Understanding their usage in the wildSurabhi Gupta, Karthik RamachandraVLDB 2021 · 34 citations
  4. SEIDEN: Revisiting Query Processing in Video Database SystemsJaeho Bang, Gaurav Tarlok Kakkar, Pramod Chunduri, Subrata Mitra et al.VLDB 2023 · 24 citations
  5. Extract-Transform-Load for Video StreamsFerdinand Kossmann, Ziniu Wu, Eugenie Lai, Nesime Tatbul et al.VLDB 2023 · 21 citations

Related papers

  1. Optimizing Machine Learning Inference Queries with Correlative Proxy ModelsZhihui Yang, Zuozhi Wang, Yicong Huang, Yao Lu et al.VLDB 2022 · 33 citations
  2. EVA: A Symbolic Approach to Accelerating Exploratory Video Analytics with Materialized ViewsZhuangdi Xu, Gaurav Tarlok Kakkar, Joy Arulraj, Umakishore RamachandranSIGMOD 2022 · 26 citations
  3. MONSOON: Multi-Step Optimization and Execution of Queries with Partially Obscured PredicatesSourav Sikdar, Chris JermaineSIGMOD 2020 · 6 citations
  4. PLAQUE: Automated Predicate Learning at Query TimeYiming Lin, Sharad MehrotraSIGMOD 2024 · 2 citations
  5. Approximating Opaque Top-k QueriesJiwon Chang, Fatemeh NargesianSIGMOD 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines