Dataset Open Access

Wikidata Graph Pattern Benchmark (WGPB) for RDF/SPARQL

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

DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="" xmlns="" xsi:schemaLocation="">
  <identifier identifierType="DOI">10.5281/zenodo.4035223</identifier>
      <creatorName>Aidan Hogan</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="">0000-0001-9482-1982</nameIdentifier>
      <affiliation>DCC, Universidad de Chile; IMFD</affiliation>
      <creatorName>Cristian Riveros</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="">0000-0003-0832-116X</nameIdentifier>
      <affiliation>DCC,  Pontificia Universidad Católica de Chile; IMFD</affiliation>
      <creatorName>Carlos Rojas</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="">0000-0002-3328-9256</nameIdentifier>
      <affiliation>DCC,  Pontificia Universidad Católica de Chile; IMFD</affiliation>
      <creatorName>Adrián Soto</creatorName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="">0000-0001-7682-1639</nameIdentifier>
      <affiliation>DCC,  Pontificia Universidad Católica de Chile; IMFD</affiliation>
    <title>Wikidata Graph Pattern Benchmark (WGPB) for RDF/SPARQL</title>
    <subject>graph database</subject>
    <subject>worst-case optimal</subject>
    <date dateType="Issued">2019-10-30</date>
  <resourceType resourceTypeGeneral="Dataset"/>
    <alternateIdentifier alternateIdentifierType="url"></alternateIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.4035222</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf"></relatedIdentifier>
    <rights rightsURI="">Creative Commons Attribution 4.0 International</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
    <description descriptionType="Abstract">&lt;p&gt;The&amp;nbsp;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.&amp;nbsp;The goal of the benchmark is to test the performance of query engines for more complex basic graph patterns. The benchmark was designed for&amp;nbsp;evaluating worst-case optimal join algorithms but also serves as a general-purpose benchmark for evaluating (basic) graph patterns. The queries are provided in &lt;a href=""&gt;SPARQL syntax&lt;/a&gt; and all return at least one solution. We limit the number of results returned to a maximum of 1,000.&lt;/p&gt;


&lt;p&gt;We provide an example of a &amp;quot;square&amp;quot; basic graph pattern (comments are added here for readability):&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT * WHERE { 
 ?x1 &amp;lt;;gt; ?x2 .  # architectural style
 ?x2 &amp;lt;;gt; ?x3 . # facet of
 ?x3 &amp;lt;;gt; ?x4 .  # followed by
 ?x1 &amp;lt;;gt; ?x4 .  # movement
} LIMIT 1000&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Note that you can try the queries on the public &lt;a href=""&gt;Wikidata Query Service&lt;/a&gt;, though some might give a timeout.&lt;/p&gt;


&lt;p&gt;The queries were generated over a reduced version of the &lt;a href=""&gt;Wikidata truthy dump&lt;/a&gt; from November 15,&amp;nbsp;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 &lt;em&gt;schema:name&lt;/em&gt;). 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.&lt;/p&gt;


&lt;p&gt;In this dataset, we then include three files:&lt;/p&gt;

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


&lt;p&gt;We provide &lt;a href=""&gt;the code&lt;/a&gt; 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), .&lt;/p&gt;


&lt;p&gt;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.&lt;/p&gt;

	&lt;li&gt;Aidan Hogan, Cristian Riveros, Carlos Rojas and Adri&amp;aacute;n Soto. &amp;quot;&lt;a href=""&gt;&lt;em&gt;A Worst-Case Optimal Join Algorithm for SPARQL&lt;/em&gt;&lt;/a&gt;&amp;quot;. In the Proceedings of the&amp;nbsp;18th International Semantic Web Conference (ISWC), Auckland, New Zealand, October 26&amp;ndash;30, 2019.&lt;/li&gt;
All versions This version
Views 435435
Downloads 8888
Data volume 167.8 GB167.8 GB
Unique views 384384
Unique downloads 6464


Cite as