Skip to content

Performance

F. Conrads edited this page Jan 18, 2018 · 4 revisions

Very Simple Queries such as

SELECT  ?type ?prop ?val  WHERE    
{ 
  <http://data.semanticweb.org/organization/yahoo-research> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type . 
  <http://data.semanticweb.org/organization/yahoo-research> ?prop ?val    
} 

have a very good performance as you can see in the following table (the benchmark only contains such simple queries. nrapheval.png

Problematic Queries as the following one, took up to 9s on a 300.000 triples Semantic Web Dog Food dataset (not in the upper benchmark)

PREFIX  geo:  <http://www.w3.org/2003/01/geo/wgs84_pos#>  
PREFIX  swrc: <http://swrc.ontoware.org/ontology#>  
PREFIX  ical: <http://www.w3.org/2002/12/cal/ical#>  
PREFIX  rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  
PREFIX  owl:  <http://www.w3.org/2002/07/owl#>  
PREFIX  swrc-ext: <http://www.cs.vu.nl/~mcaklein/onto/swrc_ext/2005/05#>  
PREFIX  dcterms: <http://purl.org/dc/terms/>  
PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>  
PREFIX  foaf: <http://xmlns.com/foaf/0.1/>  
PREFIX  swc:  <http://data.semanticweb.org/ns/swc/ontology#>  
PREFIX  dc:   <http://purl.org/dc/elements/1.1/>  

SELECT  ?title ?year  WHERE    
{ 
  ?x rdf:type swrc:InProceedings .      
  ?x dc:title ?title .      
  ?x swrc:abstract ?abstract .      
  ?x swrc:year ?year .      
  ?x dc:creator ?creator    
} 

Problem: ?x is very specific but the current planner does not use this information.

API

If you need a triple store just for your application you can add the ngraphstore.query api to your project and use the DefaultSPARQLProcessor. This will be much faster than the actual REST API provided.

Clone this wiki locally