Query dbpedia with SPARQL for films -


i want data (movie title, director name, actor name , wikipedia link) of movies present on dbpedia.

i tried query on http://dbpedia.org/snorql/.

select ?film_title ?star_name ?namedirector ?link {   {       select distinct ?movies ?film_title     {        ?movies rdf:type <http://dbpedia.org/ontology/film>;         rdfs:label ?film_title.     }    }.    ?movies dbpedia-owl:starring ?star;   foaf:isprimarytopicof ?link;   dbpedia-owl:director ?director.    ?director foaf:name ?namedirector.   ?star foaf:name ?star_name.   filter langmatches( lang(?film_title), 'en') } limit 100 

responses seems correct, response time slow, i'm wondering if can improve query faster response.

there couple of things change in query might make faster.

firstly point of select distinct subquery? merely trying eliminate duplicate film titles? removing may make things faster if can live few duplicates.

secondly filter clauses requires database scan on possible matches , evaluate expression on each possible match determine whether keep or throw away. again if can live getting duplicate data , don't mind non-english language tags removing filter may make query run faster.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -