3

I used to execute successfully the following query:

SELECT (COUNT(?r) AS ?count) WHERE { [] <http://www.wikidata.org/prop/direct/P31> ?r }

on http://wdqs-beta.wmflabs.org/bigdata/namespace/wdq/sparql

However, now this endpoint has been stopped, and when I execute the same query on official wikidata endpoint service: https://query.wikidata.org I get the following error:

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.openrdf.query.QueryInterruptedException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.bigdata.bop.engine.QueryTimeoutException: Query deadline is expired.

Which means that the query has exceeded the limit time.

Is there a way to expand executing time, or is there another sparql endpoint that allows me to execute the query ?

Thanks.

  • What are you trying to do with your query? Other queries work fine. – philshem Oct 23 '16 at 11:47
  • it calculates frequency of using property P31. It is for research purposes. – Nasreddine Oct 23 '16 at 13:33
  • P31 is "instance of" - how long did that take with the original web service? – philshem Oct 23 '16 at 17:42
  • I do not remember; it was calculated normally. – Nasreddine Oct 24 '16 at 8:13
  • What are you trying to calculate? – philshem Oct 24 '16 at 13:46
1

The following query is almost instant (try it):

SELECT (COUNT(*) AS ?count)  { ?s wdt:P31 ?o }   

In general, one have to download a dump and use it for such queries.

Another option is to use special reports (you should be especially interested in this one):

Additionally, property usage statistics is available on the Property discussion page.

Update

Hackish way: https://query.wikidata.org/sparql?ESTCARD&p=<http://www.wikidata.org/prop/direct/P31>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.