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 about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 3818919c-1c62-40e9-bbfb-ca7ae1b66203Related papers
- Efficient Execution of SPARQL Queries with OPTIONAL and UNION ExpressionsYue Pang, Lei Zou, M. Tamer Özsu, Jiaqi ChenICDE 2025
- On the Expressivity of ASK Queries in SPARQLXiaowang Zhang, Jan Van den Bussche, Kewen Wang, Heng Zhang et al.AAAI 2020
- On the Optimization of Recursive Relational Queries: Application to Graph QueriesLouis Jachiet, Pierre Genevès, Nils Gesbert, Nabil LayaïdaSIGMOD 2020 · 31 citations
- Ontology-Mediated Query Answering Using Graph Patterns with ConditionsPing Lu, Ting Deng, Haoyuan Zhang, Yufeng Jin et al.ICDE 2024
- Towards a Converged Relational-Graph Optimization FrameworkYunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang et al.SIGMOD 2025 · 4 citations
