On the Formulation of Performant SPARQL Queries

Antonis Loizou, Renzo Angles, Paul Groth


The combination of the flexibility of RDF and the expressiveness of SPARQL provides a powerful mechanism to model, integrate and query data. However, these properties also mean that it is nontrivial to write performant SPARQL queries. Indeed, it is quite easy to create queries that tax even the most optimised triple stores. Currently, application developers have little concrete guidance on how to write "good" queries.  The goal of this paper is to begin to bridge this gap. It describes five heuristics that can be applied to create optimised queries. The heuristics are informed by formal results in the literature on the semantics and complexity of evaluating SPARQL queries, which ensures that queries following these rules can be optimised effectively by an underlying RDF store. Moreover, we empirically verify the ecacy of the heuristics using a set of openly available datasets and corresponding SPARQL queries developed by a large pharmacology data integration project. The experimental results show improvements in performance across six state-of-the-art RDF stores.

Full Text: PDF
Type of Paper: Research Paper
Keywords: SPARQL, heuristics, optimization, RDF store, data integration, biomedical data
Show BibTex format: BibTeX