query-3f8d1b9bdfd083c3f94cf976cb4a5879

rq turtle/ttl

How to get this query to not time out?I am trying to see a list of all the "Good Articles" of Wikipedia that don't have parallel articles on the Hebrew Wikipedia, but unfortunately whenever I run it, it times out. This is the current query:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?article ?articleLabel (COUNT(DISTINCT ?sitelink_other) AS ?cnt) 
WHERE {
  # Identify articles that are "Good Articles" on English Wikipedia
  ?sitelink wikibase:badge wd:Q17437798;  # item is a "Good Article"
            schema:about ?article;
            schema:isPartOf <https://en.wikipedia.org/>.

  # Exclude items that have a sitelink to the Hebrew Wikipedia
  MINUS {
    ?sitelink_he schema:about ?article; schema:isPartOf <https://he.wikipedia.org/>.
  }

  # Count the number of interwiki sitelinks
  ?sitelink_other schema:about ?article.

  # Include labels
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?article ?articleLabel 
ORDER BY DESC(?cnt) # order by the count of interwiki sitelinks in descending order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article"):::projected v6("?cnt") v2("?sitelink") v4("?sitelink_he") v5("?sitelink_other"):::projected c5([https://en.wikipedia.org/]):::iri c6([https://he.wikipedia.org/]):::iri c8(["bd:serviceParam"]):::iri c10(["en"]):::literal c2(["wd:Q17437798"]):::iri v2 --"wikibase:badge"--> c2 v2 --"schema:about"--> v3 v2 --"schema:isPartOf"--> c5 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v4 --"schema:about"--> v3 v4 --"schema:isPartOf"--> c6 end v5 --"schema:about"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind2[/"count(?sitelink_other)"/] v5 --o bind2 bind2 --as--o v6