LorenzBuehmann commented on PR #1344:
URL: https://github.com/apache/jena/pull/1344#issuecomment-1146070778
> Experts - what is the impact of no index on performance?
Not an expert but using Fuseki with GeoSPARQL for a longer time now ...
Containment checks can be way slower without index usage:
For example, currently, spatial containment queries that lead to point in
polygon checks can make use of the index first (takes an envelope of the
polygon, i.e. a rectangle to gather all points in this rectangle followed by a
second check for proper point in polygon check necessary to filter points not
in the polygon - for a large datasets and a small polygon this can be a huge
performance gain. I don't have that exhaustive numbers at the moment though a
minor example on a dataset about companies (`2 374 998` in total):
The query gives the number of companies (`10 270`) in a small part of
Germany:
``` sparql
SELECT (count(?c) as ?cnt) {
BIND("POLYGON((7.654288035299954 51.82366598560922,11.257803660299954
51.82366598560922,11.257803660299954 49.59800926392628,7.654288035299954
49.59800926392628,7.654288035299954 51.82366598560922))"^^geo:wktLiteral as
?box)
?c spatial:withinBoxGeom(?box) . # the explicit spatial index lookup
?c a coy:Company ;
geo:hasGeometry/geo:asWKT ?lit .
FILTER(geof:sfContains(?box, ?lit))
}
```
with the index lookup triple pattern it takes 0.1s, without it takes ~10s.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]