Lune

WWW2022Top-tier venue

The Case of SPARQL UNION, FILTER and DISTINCT

Medha Atre

Abstract

SPARQL’s Basic Graph Pattern (BGP) queries are well-researched for query optimisation and RDF indexing techniques. They resemble SQL inner joins and benefit from reorderability of triple patterns in their performance optimisation. But other components of SPARQL such as OPTIONAL, UNION, FILTER, DISTINCT pose more challenges, as they are part of the SPARQL recursive grammar and impose restrictions on the reorderability of triple patterns. These components are important because they help in querying the semi-structured data as opposed to the strictly structured relational data with a stringent schema. In this paper, we use previously published optimisation techniques for BGP-OPTIONAL queries as primitives, and show how they can be used for SPARQL queries with any intermix of UNION, FILTER, and DISTINCT clauses. We mainly focus on the structural aspects of these queries, identify UNION, FILTER, and DISTINCT queries that can use these BGP-OPTIONAL optimisation techniques, and extend some of the previously published theoretical results.

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.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. Efficient Execution of SPARQL Queries with OPTIONAL and UNION ExpressionsYue Pang, Lei Zou, M. Tamer Özsu, Jiaqi ChenICDE 2025
  2. On the Expressivity of ASK Queries in SPARQLXiaowang Zhang, Jan Van den Bussche, Kewen Wang, Heng Zhang et al.AAAI 2020
  3. On the Optimization of Recursive Relational Queries: Application to Graph QueriesLouis Jachiet, Pierre Genevès, Nils Gesbert, Nabil LayaïdaSIGMOD 2020 · 31 citations
  4. Ontology-Mediated Query Answering Using Graph Patterns with ConditionsPing Lu, Ting Deng, Haoyuan Zhang, Yufeng Jin et al.ICDE 2024
  5. Towards a Converged Relational-Graph Optimization FrameworkYunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang et al.SIGMOD 2025 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines