Skip to content

query timeout #18

Description

@VladimirAlexiev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions