Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query timeout #18

Open
VladimirAlexiev opened this issue Apr 27, 2019 · 0 comments
Open

query timeout #18

VladimirAlexiev opened this issue Apr 27, 2019 · 0 comments

Comments

@VladimirAlexiev
Copy link

The query "list" given at http://wikicite.org/statistics.html column "types" times out.

# List of publication types. See also https://www.npmjs.com/package/wikidata-taxonomy
SELECT ?item ?itemLabel ?itemDescription ?instances ?sites WITH {
  SELECT DISTINCT ?item { ?item wdt:P279* wd:Q732577 }
} AS %types WHERE {
  INCLUDE %types .
  { 
    SELECT ?item (COUNT(DISTINCT ?instance) AS ?instances) {
      INCLUDE %types .
      OPTIONAL { ?instance wdt:P31 ?item }
    } GROUP BY ?item
  }
   {
     SELECT ?item (COUNT(DISTINCT ?site) AS ?sites) {
       INCLUDE %types.
       OPTIONAL { ?site schema:about ?item }
     } GROUP BY ?item
   }  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

WD has a strict timeout of 1 minute. I guess you need to simplify it. Eg try removing the DISTINCT ?instance or cut out the ?site part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant