Any suggestions on how to optimize this query? We’re running 5.0.3. Thanks very much!
WITH <http://geophy.io/ingestion/graph/target/a462edc91ba0ba8fc3b551516a366be9>
DELETE {
?lakeIri ?predicate_following ?object_following .
?subject_preceding ?predicate_preceding ?lakeIri .
}
INSERT {
?subject_preceding ?predicate_preceding ?coreIri .
?coreIri ?predicate_following ?object_following .
?coreIri <http://geophy.io/ontologies/ingestion#is_matched> ?matched_flag .
?coreIri <http://www.w3.org/ns/prov#wasDerivedFrom> ?lakeIri .
}
WHERE {
VALUES (?coreIri ?lakeIri ?matched_flag) {
(<http://geophy.io/amenities/2kNHkhSRTHOC9WGU9n4AfA> <http://geophy.io/metadata/entity/129380> false)
(<http://geophy.io/amenities/ctvrm_dlT-uwKZinGTdpSg> <http://geophy.io/metadata/entity/112421> false)
(<http://geophy.io/amenities/KBHXXtgnQeqg6yja_Bg7NQ> <http://geophy.io/metadata/entity/105490> false)
(<http://geophy.io/amenities/FHFROXjsTDOws9JVlWtnjg> <http://geophy.io/metadata/entity/114512> false)
(<http://geophy.io/amenities/pFAAEtvJSYi2Jzj19L-4nw> <http://geophy.io/metadata/entity/96251> false)
(<http://geophy.io/amenities/h394SZ6RQZKlC3WaurGGwg> <http://geophy.io/metadata/entity/99517> false)
(<http://geophy.io/amenities/al2_UhhcTWaEL1TkIx-sEw> <http://geophy.io/metadata/entity/115877> false)
(<http://geophy.io/amenities/knV5zH5CRpmBrbsU_bGuLg> <http://geophy.io/metadata/entity/113408> false)
(<http://geophy.io/amenities/FUDCIc8vQsKuBLNPgblcTA> <http://geophy.io/metadata/entity/108336> false)
}
?subject_preceding ?predicate_preceding ?lakeIri .
FILTER (?subject_preceding != ?lakeIri)
}