Оптимизируйте запросы к викиданным, чтобы сократить время. SPARQL - PullRequest
1 голос
/ 20 июня 2020

Я получаю тайм-аут на запрос ниже. Может ли кто-нибудь помочь мне оптимизировать его?

SELECT ?human ?humanLabel ?alternative ?humanDescription ?birth_date ?image ?occupationLabel ?nationalityLabel ?sex_or_genderLabel ?date_of_death WHERE {
   ?human wdt:P31 wd:Q5. 
   ?human wdt:P18 ?image.
   ?human p:P569/psv:P569 ?birth_date_node.
   ?birth_date_node wikibase:timeValue ?birth_date.
   optional {?human wdt:P106 ?occupation.}
   optional {?human wdt:P27 ?nationality.}
   OPTIONAL {?human wdt:P21 ?sex_or_gender.}
   OPTIONAL {?human wdt:P570 ?date_of_death.}
   OPTIONAL {?human skos:altLabel ?alternative.}
   FILTER (year(?birth_date) >= 1981).
   FILTER (year(?birth_date) < 1982).
  
   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
      }
}
ORDER BY ?name
...