Chiming in my excitement that the sparql service is 'officially' up!
As suggested somewhere far above, it would be great for the community to catalogue the queries that are most important for their use cases that do not do well on the SPARQL endpoint. Its likely that the list isn't going to be super-long (in terms of query structure), hence it might make sense to establish dedicated, optimized web services (that exist apart from the endpoint) to call upon when those kinds of queries need to be executed.
-Ben
On Tue, Sep 8, 2015 at 8:58 AM, James Heald j.heald@ucl.ac.uk wrote:
On 08/09/2015 16:15, Markus Krötzsch wrote:
Yes, path queries (called TREE queries in WDQ) are usually faster in WDQ. I think that WDQ is better optimised for this type of queries. This is also what I had in mind with what I wrote: if you narrow down your query language to specific use cases and (possibly) a subset of the data, then you may be able to achieve a better performance in return. There is always a trade-off there. SPARQL is rather complex (if you look at the query examples page, you get an idea of the possibilities), but there is a price to pay for this. I still hope that path queries in particular can be made faster in the future (it still is a rather recent SPARQL feature and I am sure BlazeGraph are continuously working on improving their code).
Markus
Thanks, Markus.
Path queries are pretty important for Wikidata, though, because the way Wikidata is constructed in practice you almost never want to query for an instance (P31) of a class -- you will almost always want to include its subclasses too.
Another query I tried and gave trouble was when somebody asked how to find (or even count) all statements referenced to http://www.lefigaro.fr/... -- see https://www.wikidata.org/wiki/Wikidata:Project_chat#WQS:_Searching_for_items...
It may be that there's a better solution than my newbie attempt at http://tinyurl.com/pxlrkd7 -- but on the face of it, it looks as if WQS is timing out trying to make a list of all URLs that are the target of a P854 in a reference, and falling over trying.
But perhaps people with more SPARQL experience than my approximately 24 hours may be able to suggest a better way round this?
All best,
James.
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata