Dataset Open Access

Wikidata Graph Pattern Benchmark (WGPB) for RDF/SPARQL

Aidan Hogan; Cristian Riveros; Carlos Rojas; Adrián Soto


Dublin Core Export

<?xml version='1.0' encoding='utf-8'?>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
  <dc:creator>Aidan Hogan</dc:creator>
  <dc:creator>Cristian Riveros</dc:creator>
  <dc:creator>Carlos Rojas</dc:creator>
  <dc:creator>Adrián Soto</dc:creator>
  <dc:date>2019-10-30</dc:date>
  <dc:description>The Wikidata Graph Pattern Benchmark (WGPB) is a benchmark consisting of 50 instances of 17 different abstract query patterns giving a total of 850 SPARQL queries. The goal of the benchmark is to test the performance of query engines for more complex basic graph patterns. The benchmark was designed for evaluating worst-case optimal join algorithms but also serves as a general-purpose benchmark for evaluating (basic) graph patterns. The queries are provided in SPARQL syntax and all return at least one solution. We limit the number of results returned to a maximum of 1,000.

Queries

We provide an example of a "square" basic graph pattern (comments are added here for readability):

SELECT * WHERE { 
 ?x1 &lt;http://www.wikidata.org/prop/direct/P149&gt; ?x2 .  # architectural style
 ?x2 &lt;http://www.wikidata.org/prop/direct/P1269&gt; ?x3 . # facet of
 ?x3 &lt;http://www.wikidata.org/prop/direct/P156&gt; ?x4 .  # followed by
 ?x1 &lt;http://www.wikidata.org/prop/direct/P135&gt; ?x4 .  # movement
} LIMIT 1000

There are 49 other queries similar to this one in the dataset (replacing the predicates with other predicates), and 50 queries for 16 other abstract query patterns. For more details on these patterns, we refer to the publication mentioned below.

Note that you can try the queries on the public Wikidata Query Service, though some might give a timeout.

Generation

The queries were generated over a reduced version of the Wikidata truthy dump from November 15, 2018 that we call the Wikidata Core Graph (WCG). Specifically, in order to reduce the data volume, multilingual labels, comments, etc., were removed as they have limited use for evaluating joins (English labels were kept under schema:name). Thereafter, in order to facilitate the generation of the queries, triples with rare predicates appearing in fewer than 1,000 triples, and very common predicates appearing in more than 1,000,000 triples, were removed. The queries provided will generate the same results over both graphs.

Files

In this dataset, we then include three files:


	wgpb-queries.zip The list of 850 queries
	wikidata-wcg.nt.gz Wikidata truthy graph with English labels
	wikidata-wcg-filtered.nt.bz2 Wikidata truthy graph with English labels filtering triples with rare (&lt;1000 triples) and very common (&gt;1000000) predicates


Code

We provide the code for generating the datasets, queries, etc., along with scripts and instructions on how to run these queries in a variety of SPARQL engines (Blazegraph, Jena, Virtuoso and our worst-case optimal variant of Jena), .

Publication

The benchmark is proposed, described and used in the following paper. You can find more details about how it was generated, the 17 abstract patterns that were used, as well as results for prominent SPARQL engines.


	Aidan Hogan, Cristian Riveros, Carlos Rojas and Adrián Soto. "A Worst-Case Optimal Join Algorithm for SPARQL". In the Proceedings of the 18th International Semantic Web Conference (ISWC), Auckland, New Zealand, October 26–30, 2019.
</dc:description>
  <dc:identifier>https://zenodo.org/record/4035223</dc:identifier>
  <dc:identifier>10.5281/zenodo.4035223</dc:identifier>
  <dc:identifier>oai:zenodo.org:4035223</dc:identifier>
  <dc:relation>doi:10.5281/zenodo.4035222</dc:relation>
  <dc:relation>url:https://zenodo.org/communities/linkeddata</dc:relation>
  <dc:rights>info:eu-repo/semantics/openAccess</dc:rights>
  <dc:rights>https://creativecommons.org/licenses/by/4.0/legalcode</dc:rights>
  <dc:subject>graph database</dc:subject>
  <dc:subject>sparql</dc:subject>
  <dc:subject>worst-case optimal</dc:subject>
  <dc:subject>benchmark</dc:subject>
  <dc:subject>wikidata</dc:subject>
  <dc:subject>rdf</dc:subject>
  <dc:title>Wikidata Graph Pattern Benchmark (WGPB) for RDF/SPARQL</dc:title>
  <dc:type>info:eu-repo/semantics/other</dc:type>
  <dc:type>dataset</dc:type>
</oai_dc:dc>
419
87
views
downloads
All versions This version
Views 419419
Downloads 8787
Data volume 167.8 GB167.8 GB
Unique views 368368
Unique downloads 6363

Share

Cite as