Fix: reduce resource usage by migrations

* Renamed migrations

* Limit queries to specific graphs and move filters up
This commit is contained in:
Alexander van den Berghe
2024-02-05 10:56:08 +00:00
committed by GitHub
parent c567c06262
commit dbb80aba03
3 changed files with 28 additions and 17 deletions

View File

@@ -1,16 +0,0 @@
DELETE
{
GRAPH ?g {
?s ?p ?oLang.
}
}
WHERE {
GRAPH ?g {
?s ?p ?oLang.
?s ?p ?o .
}
BIND(LANG(?oLang) as ?lang)
FILTER(STRLEN(STR(?lang)) > 0)
FILTER(STR(?oLang) = ?o)
}

View File

@@ -0,0 +1,21 @@
DELETE {
GRAPH ?g {
?s ?p ?oLang.
}
} WHERE {
GRAPH ?g {
?s ?p ?oLang.
BIND(LANG(?oLang) as ?lang)
FILTER(STRLEN(STR(?lang)) > 0)
?s ?p ?o .
FILTER(STR(?oLang) = ?o)
}
VALUES ?g {
<http://mu.semte.ch/graphs/public>
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
}
}

View File

@@ -14,4 +14,10 @@ DELETE {
FILTER (datatype(?o) = <http://mu.semte.ch/vocabularies/typed-literals/boolean>)
BIND (STRDT(STR(?o), xsd:boolean) AS ?newLiteral)
}
}
VALUES ?g {
<http://mu.semte.ch/graphs/public>
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
}
}