You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2022/06/03 15:21:15 UTC

[GitHub] [jena] LorenzBuehmann commented on pull request #1344: jena-geosparql - Add assembler option to disable spatial index

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: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org