Skip to content

Commit

Permalink
optimize query by hash; related to bio-guoda/preston#199
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorrit Poelen committed Dec 21, 2023
1 parent 8a89d82 commit d327a59
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hash.rq
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ WHERE
{
SELECT ?doi ?seenAt ?archiveUrl ?uuid
WHERE {
graph ?activity {
?_hash_iri <http://www.w3.org/ns/prov#qualifiedGeneration> ?activity .
?activity <http://www.w3.org/ns/prov#used> ?archiveUrl .
?activity <http://www.w3.org/ns/prov#generatedAtTime> ?seenAt .
}
graph ?g1 {
?uuid <http://www.w3.org/ns/prov#hadMember> ?archiveUrl .
?uuid <http://www.w3.org/1999/02/22-rdf-syntax-ns#seeAlso> ?doi .
?archiveUrl <http://purl.org/dc/elements/1.1/format> "application/dwca" .
}
graph ?activity {
?activity <http://www.w3.org/ns/prov#used> ?archiveUrl .
?activity <http://www.w3.org/ns/prov#generatedAtTime> ?seenAt .
?_hash_iri <http://www.w3.org/ns/prov#qualifiedGeneration> ?activity .
}

}
}
UNION
{
SELECT ?doi ?seenAt ?archiveUrl ?uuid
WHERE {
?_hash_iri <http://www.w3.org/ns/prov#qualifiedGeneration> ?activity .
?activity <http://www.w3.org/ns/prov#used> ?archiveUrl .
?activity <http://www.w3.org/ns/prov#generatedAtTime> ?seenAt .
?uuid <http://www.w3.org/ns/prov#hadMember> ?archiveUrl .
?uuid <http://www.w3.org/1999/02/22-rdf-syntax-ns#seeAlso> ?doi .
?archiveUrl <http://purl.org/dc/elements/1.1/format> "application/dwca" .
?activity <http://www.w3.org/ns/prov#used> ?archiveUrl .
?activity <http://www.w3.org/ns/prov#generatedAtTime> ?seenAt .
?_hash_iri <http://www.w3.org/ns/prov#qualifiedGeneration> ?activity .
}
}
} ORDER BY DESC(?seenAt)
Expand Down

0 comments on commit d327a59

Please sign in to comment.