You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Samur Araujo <s....@geophy.com> on 2017/01/09 07:49:31 UTC
Spatial Jena
Hi all, I noticed that jena spatial is very slow.
Query like the one below take 3s to execute (under entire geonames).
PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
<http://www.w3.org/2000/01/rdf-schema#>
SELECT distinct ?place{
?place spatial:intersectBox (32.55668 -117.12865 32.56668 -117.13865) .
}
The same query in solr/lucene takes only 20ms.
I wonder why fuseki or jena spatial is so slow.
Any clue about it?
--
Senior Data Scientist
Geophy
www.geophy.com
Nieuwe Plantage 54-55
2611XK Delft
+31 (0)70 7640725
1 Fore Street
EC2Y 9DT London
+44 (0)20 37690760
Re: Spatial Jena
Posted by Osma Suominen <os...@helsinki.fi>.
Hi Samur,
That sounds very good, did you make a Jira issue already? I haven't
noticed one.
Go to https://issues.apache.org/jira/browse/JENA
Register if you don't have an account already
Create an issue
-Osma
10.01.2017, 13:23, Samur Araujo kirjoitti:
> Hi Osma, I report it on Jira. Basically, I use the geonames dataset and run
> the query below.
>
> It takes 4s on Fuseki 2, in the Jena latest version.
>
> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
> <http://www.w3.org/2000/01/rdf-schema#>
> SELECT distinct ?place{
> ?place spatial:intersectBox (32.55668 -117.12865 32.56668 -117.13865) .
> }
>
>
> On 9 January 2017 at 09:25, Osma Suominen <os...@helsinki.fi> wrote:
>
>> Hi Samur,
>>
>> Can you report this to JIRA with a reproducible full description? I.e.
>> link to the data set you used, your jena-spatial index configuration,
>> Jena/Fuseki versions you used, and of course the query and results.
>>
>> -Osma
>>
>>
>> 09.01.2017, 10:16, Samur Araujo kirjoitti:
>>
>>> I test them all and all have the same issue.
>>>
>>> I think there are some merging happening after accessing the index that
>>> make it slow.
>>>
>>> I did not look into the code to see where is the issue.
>>>
>>> Best,
>>>
>>> On 9 January 2017 at 09:12, Osma Suominen <os...@helsinki.fi>
>>> wrote:
>>>
>>> Hi Samur,
>>>>
>>>> I agree, that's really slow. I wonder if that's some kind of regression.
>>>> jena-spatial hasn't been actively worked on for a while.
>>>>
>>>> Can you test with some or all of these:
>>>> - current (3.1.1) and perhaps a few previous Jena releases
>>>> - current master
>>>> - jmvanel's fork which uses Lucene 5.3.3
>>>>
>>>> and see if this makes a difference?
>>>>
>>>> -Osma
>>>>
>>>>
>>>> 09.01.2017, 10:08, Samur Araujo kirjoitti:
>>>>
>>>> Hi Osma, as you can see below, it makes no difference:
>>>>>
>>>>>
>>>>> [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
>>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>>> [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
>>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place {
>>>>> ?place
>>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>>> [2017-01-09 09:07:16] Fuseki INFO [4] exec/select
>>>>> [2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
>>>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST
>>>>> http://localhost:3030/spatial/query
>>>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
>>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>>> [2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
>>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>>> [2017-01-09 09:07:25] Fuseki INFO [5] exec/select
>>>>> [2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
>>>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST
>>>>> http://localhost:3030/spatial/query
>>>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
>>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>>> [2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
>>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>>> [2017-01-09 09:07:34] Fuseki INFO [6] exec/select
>>>>> [2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
>>>>>
>>>>> I wonder why is so slow if the lucene index is so fast and the result
>>>>> set
>>>>> contains only 17 resources.
>>>>>
>>>>> On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi>
>>>>> wrote:
>>>>>
>>>>> Hi Samur!
>>>>>
>>>>>>
>>>>>> Does it help if you drop the DISTINCT?
>>>>>>
>>>>>> -Osma
>>>>>>
>>>>>>
>>>>>> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>>>>>>
>>>>>> Hi all, I noticed that jena spatial is very slow.
>>>>>>
>>>>>>>
>>>>>>> Query like the one below take 3s to execute (under entire geonames).
>>>>>>>
>>>>>>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>>>>>>> <http://www.w3.org/2000/01/rdf-schema#>
>>>>>>> SELECT distinct ?place{
>>>>>>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>>>>>>> -117.13865) .
>>>>>>> }
>>>>>>>
>>>>>>> The same query in solr/lucene takes only 20ms.
>>>>>>>
>>>>>>> I wonder why fuseki or jena spatial is so slow.
>>>>>>>
>>>>>>> Any clue about it?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> Osma Suominen
>>>>>> D.Sc. (Tech), Information Systems Specialist
>>>>>> National Library of Finland
>>>>>> P.O. Box 26 (Kaikukatu 4)
>>>>>> 00014 HELSINGIN YLIOPISTO
>>>>>> Tel. +358 50 3199529
>>>>>> osma.suominen@helsinki.fi
>>>>>> http://www.nationallibrary.fi
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Osma Suominen
>>>> D.Sc. (Tech), Information Systems Specialist
>>>> National Library of Finland
>>>> P.O. Box 26 (Kaikukatu 4)
>>>> 00014 HELSINGIN YLIOPISTO
>>>> Tel. +358 50 3199529
>>>> osma.suominen@helsinki.fi
>>>> http://www.nationallibrary.fi
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> Osma Suominen
>> D.Sc. (Tech), Information Systems Specialist
>> National Library of Finland
>> P.O. Box 26 (Kaikukatu 4)
>> 00014 HELSINGIN YLIOPISTO
>> Tel. +358 50 3199529
>> osma.suominen@helsinki.fi
>> http://www.nationallibrary.fi
>>
>
>
>
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suominen@helsinki.fi
http://www.nationallibrary.fi
Re: Spatial Jena
Posted by Samur Araujo <s....@geophy.com>.
Hi Osma, I report it on Jira. Basically, I use the geonames dataset and run
the query below.
It takes 4s on Fuseki 2, in the Jena latest version.
PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
<http://www.w3.org/2000/01/rdf-schema#>
SELECT distinct ?place{
?place spatial:intersectBox (32.55668 -117.12865 32.56668 -117.13865) .
}
On 9 January 2017 at 09:25, Osma Suominen <os...@helsinki.fi> wrote:
> Hi Samur,
>
> Can you report this to JIRA with a reproducible full description? I.e.
> link to the data set you used, your jena-spatial index configuration,
> Jena/Fuseki versions you used, and of course the query and results.
>
> -Osma
>
>
> 09.01.2017, 10:16, Samur Araujo kirjoitti:
>
>> I test them all and all have the same issue.
>>
>> I think there are some merging happening after accessing the index that
>> make it slow.
>>
>> I did not look into the code to see where is the issue.
>>
>> Best,
>>
>> On 9 January 2017 at 09:12, Osma Suominen <os...@helsinki.fi>
>> wrote:
>>
>> Hi Samur,
>>>
>>> I agree, that's really slow. I wonder if that's some kind of regression.
>>> jena-spatial hasn't been actively worked on for a while.
>>>
>>> Can you test with some or all of these:
>>> - current (3.1.1) and perhaps a few previous Jena releases
>>> - current master
>>> - jmvanel's fork which uses Lucene 5.3.3
>>>
>>> and see if this makes a difference?
>>>
>>> -Osma
>>>
>>>
>>> 09.01.2017, 10:08, Samur Araujo kirjoitti:
>>>
>>> Hi Osma, as you can see below, it makes no difference:
>>>>
>>>>
>>>> [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>> [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place {
>>>> ?place
>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>> [2017-01-09 09:07:16] Fuseki INFO [4] exec/select
>>>> [2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
>>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST
>>>> http://localhost:3030/spatial/query
>>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>> [2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>> [2017-01-09 09:07:25] Fuseki INFO [5] exec/select
>>>> [2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
>>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST
>>>> http://localhost:3030/spatial/query
>>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
>>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>>> [2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
>>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>>> [2017-01-09 09:07:34] Fuseki INFO [6] exec/select
>>>> [2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
>>>>
>>>> I wonder why is so slow if the lucene index is so fast and the result
>>>> set
>>>> contains only 17 resources.
>>>>
>>>> On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi>
>>>> wrote:
>>>>
>>>> Hi Samur!
>>>>
>>>>>
>>>>> Does it help if you drop the DISTINCT?
>>>>>
>>>>> -Osma
>>>>>
>>>>>
>>>>> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>>>>>
>>>>> Hi all, I noticed that jena spatial is very slow.
>>>>>
>>>>>>
>>>>>> Query like the one below take 3s to execute (under entire geonames).
>>>>>>
>>>>>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>>>>>> <http://www.w3.org/2000/01/rdf-schema#>
>>>>>> SELECT distinct ?place{
>>>>>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>>>>>> -117.13865) .
>>>>>> }
>>>>>>
>>>>>> The same query in solr/lucene takes only 20ms.
>>>>>>
>>>>>> I wonder why fuseki or jena spatial is so slow.
>>>>>>
>>>>>> Any clue about it?
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>> Osma Suominen
>>>>> D.Sc. (Tech), Information Systems Specialist
>>>>> National Library of Finland
>>>>> P.O. Box 26 (Kaikukatu 4)
>>>>> 00014 HELSINGIN YLIOPISTO
>>>>> Tel. +358 50 3199529
>>>>> osma.suominen@helsinki.fi
>>>>> http://www.nationallibrary.fi
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> --
>>> Osma Suominen
>>> D.Sc. (Tech), Information Systems Specialist
>>> National Library of Finland
>>> P.O. Box 26 (Kaikukatu 4)
>>> 00014 HELSINGIN YLIOPISTO
>>> Tel. +358 50 3199529
>>> osma.suominen@helsinki.fi
>>> http://www.nationallibrary.fi
>>>
>>>
>>
>>
>>
>
> --
> Osma Suominen
> D.Sc. (Tech), Information Systems Specialist
> National Library of Finland
> P.O. Box 26 (Kaikukatu 4)
> 00014 HELSINGIN YLIOPISTO
> Tel. +358 50 3199529
> osma.suominen@helsinki.fi
> http://www.nationallibrary.fi
>
--
Senior Data Scientist
Geophy
www.geophy.com
Nieuwe Plantage 54-55
2611XK Delft
+31 (0)70 7640725
1 Fore Street
EC2Y 9DT London
+44 (0)20 37690760
Re: Spatial Jena
Posted by Osma Suominen <os...@helsinki.fi>.
Hi Samur,
Can you report this to JIRA with a reproducible full description? I.e.
link to the data set you used, your jena-spatial index configuration,
Jena/Fuseki versions you used, and of course the query and results.
-Osma
09.01.2017, 10:16, Samur Araujo kirjoitti:
> I test them all and all have the same issue.
>
> I think there are some merging happening after accessing the index that
> make it slow.
>
> I did not look into the code to see where is the issue.
>
> Best,
>
> On 9 January 2017 at 09:12, Osma Suominen <os...@helsinki.fi> wrote:
>
>> Hi Samur,
>>
>> I agree, that's really slow. I wonder if that's some kind of regression.
>> jena-spatial hasn't been actively worked on for a while.
>>
>> Can you test with some or all of these:
>> - current (3.1.1) and perhaps a few previous Jena releases
>> - current master
>> - jmvanel's fork which uses Lucene 5.3.3
>>
>> and see if this makes a difference?
>>
>> -Osma
>>
>>
>> 09.01.2017, 10:08, Samur Araujo kirjoitti:
>>
>>> Hi Osma, as you can see below, it makes no difference:
>>>
>>>
>>> [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>> [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>> http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place {
>>> ?place
>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>> [2017-01-09 09:07:16] Fuseki INFO [4] exec/select
>>> [2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST
>>> http://localhost:3030/spatial/query
>>> [2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>> [2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>> [2017-01-09 09:07:25] Fuseki INFO [5] exec/select
>>> [2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST
>>> http://localhost:3030/spatial/query
>>> [2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
>>> [application/x-www-form-urlencoded charset=utf-8] ?
>>> [2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
>>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>>> [2017-01-09 09:07:34] Fuseki INFO [6] exec/select
>>> [2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
>>>
>>> I wonder why is so slow if the lucene index is so fast and the result set
>>> contains only 17 resources.
>>>
>>> On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi>
>>> wrote:
>>>
>>> Hi Samur!
>>>>
>>>> Does it help if you drop the DISTINCT?
>>>>
>>>> -Osma
>>>>
>>>>
>>>> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>>>>
>>>> Hi all, I noticed that jena spatial is very slow.
>>>>>
>>>>> Query like the one below take 3s to execute (under entire geonames).
>>>>>
>>>>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>>>>> <http://www.w3.org/2000/01/rdf-schema#>
>>>>> SELECT distinct ?place{
>>>>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>>>>> -117.13865) .
>>>>> }
>>>>>
>>>>> The same query in solr/lucene takes only 20ms.
>>>>>
>>>>> I wonder why fuseki or jena spatial is so slow.
>>>>>
>>>>> Any clue about it?
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Osma Suominen
>>>> D.Sc. (Tech), Information Systems Specialist
>>>> National Library of Finland
>>>> P.O. Box 26 (Kaikukatu 4)
>>>> 00014 HELSINGIN YLIOPISTO
>>>> Tel. +358 50 3199529
>>>> osma.suominen@helsinki.fi
>>>> http://www.nationallibrary.fi
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> Osma Suominen
>> D.Sc. (Tech), Information Systems Specialist
>> National Library of Finland
>> P.O. Box 26 (Kaikukatu 4)
>> 00014 HELSINGIN YLIOPISTO
>> Tel. +358 50 3199529
>> osma.suominen@helsinki.fi
>> http://www.nationallibrary.fi
>>
>
>
>
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suominen@helsinki.fi
http://www.nationallibrary.fi
Re: Spatial Jena
Posted by Samur Araujo <s....@geophy.com>.
I test them all and all have the same issue.
I think there are some merging happening after accessing the index that
make it slow.
I did not look into the code to see where is the issue.
Best,
On 9 January 2017 at 09:12, Osma Suominen <os...@helsinki.fi> wrote:
> Hi Samur,
>
> I agree, that's really slow. I wonder if that's some kind of regression.
> jena-spatial hasn't been actively worked on for a while.
>
> Can you test with some or all of these:
> - current (3.1.1) and perhaps a few previous Jena releases
> - current master
> - jmvanel's fork which uses Lucene 5.3.3
>
> and see if this makes a difference?
>
> -Osma
>
>
> 09.01.2017, 10:08, Samur Araujo kirjoitti:
>
>> Hi Osma, as you can see below, it makes no difference:
>>
>>
>> [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
>> [application/x-www-form-urlencoded charset=utf-8] ?
>> [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>> http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place {
>> ?place
>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>> [2017-01-09 09:07:16] Fuseki INFO [4] exec/select
>> [2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
>> [2017-01-09 09:07:21] Fuseki INFO [5] POST
>> http://localhost:3030/spatial/query
>> [2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
>> [application/x-www-form-urlencoded charset=utf-8] ?
>> [2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>> [2017-01-09 09:07:25] Fuseki INFO [5] exec/select
>> [2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
>> [2017-01-09 09:07:28] Fuseki INFO [6] POST
>> http://localhost:3030/spatial/query
>> [2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
>> [application/x-www-form-urlencoded charset=utf-8] ?
>> [2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
>> http://jena.apache.org/spatial#> PREFIX rdfs: <
>> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
>> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
>> [2017-01-09 09:07:34] Fuseki INFO [6] exec/select
>> [2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
>>
>> I wonder why is so slow if the lucene index is so fast and the result set
>> contains only 17 resources.
>>
>> On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi>
>> wrote:
>>
>> Hi Samur!
>>>
>>> Does it help if you drop the DISTINCT?
>>>
>>> -Osma
>>>
>>>
>>> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>>>
>>> Hi all, I noticed that jena spatial is very slow.
>>>>
>>>> Query like the one below take 3s to execute (under entire geonames).
>>>>
>>>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>>>> <http://www.w3.org/2000/01/rdf-schema#>
>>>> SELECT distinct ?place{
>>>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>>>> -117.13865) .
>>>> }
>>>>
>>>> The same query in solr/lucene takes only 20ms.
>>>>
>>>> I wonder why fuseki or jena spatial is so slow.
>>>>
>>>> Any clue about it?
>>>>
>>>>
>>>>
>>> --
>>> Osma Suominen
>>> D.Sc. (Tech), Information Systems Specialist
>>> National Library of Finland
>>> P.O. Box 26 (Kaikukatu 4)
>>> 00014 HELSINGIN YLIOPISTO
>>> Tel. +358 50 3199529
>>> osma.suominen@helsinki.fi
>>> http://www.nationallibrary.fi
>>>
>>>
>>
>>
>>
>
> --
> Osma Suominen
> D.Sc. (Tech), Information Systems Specialist
> National Library of Finland
> P.O. Box 26 (Kaikukatu 4)
> 00014 HELSINGIN YLIOPISTO
> Tel. +358 50 3199529
> osma.suominen@helsinki.fi
> http://www.nationallibrary.fi
>
--
Senior Data Scientist
Geophy
www.geophy.com
Nieuwe Plantage 54-55
2611XK Delft
+31 (0)70 7640725
1 Fore Street
EC2Y 9DT London
+44 (0)20 37690760
Re: Spatial Jena
Posted by Osma Suominen <os...@helsinki.fi>.
Hi Samur,
I agree, that's really slow. I wonder if that's some kind of regression.
jena-spatial hasn't been actively worked on for a while.
Can you test with some or all of these:
- current (3.1.1) and perhaps a few previous Jena releases
- current master
- jmvanel's fork which uses Lucene 5.3.3
and see if this makes a difference?
-Osma
09.01.2017, 10:08, Samur Araujo kirjoitti:
> Hi Osma, as you can see below, it makes no difference:
>
>
> [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
> [application/x-www-form-urlencoded charset=utf-8] ?
> [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
> http://jena.apache.org/spatial#> PREFIX rdfs: <
> http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place { ?place
> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
> [2017-01-09 09:07:16] Fuseki INFO [4] exec/select
> [2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
> [2017-01-09 09:07:21] Fuseki INFO [5] POST
> http://localhost:3030/spatial/query
> [2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
> [application/x-www-form-urlencoded charset=utf-8] ?
> [2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
> http://jena.apache.org/spatial#> PREFIX rdfs: <
> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
> [2017-01-09 09:07:25] Fuseki INFO [5] exec/select
> [2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
> [2017-01-09 09:07:28] Fuseki INFO [6] POST
> http://localhost:3030/spatial/query
> [2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
> [application/x-www-form-urlencoded charset=utf-8] ?
> [2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
> http://jena.apache.org/spatial#> PREFIX rdfs: <
> http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
> spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
> [2017-01-09 09:07:34] Fuseki INFO [6] exec/select
> [2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
>
> I wonder why is so slow if the lucene index is so fast and the result set
> contains only 17 resources.
>
> On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi> wrote:
>
>> Hi Samur!
>>
>> Does it help if you drop the DISTINCT?
>>
>> -Osma
>>
>>
>> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>>
>>> Hi all, I noticed that jena spatial is very slow.
>>>
>>> Query like the one below take 3s to execute (under entire geonames).
>>>
>>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>>> <http://www.w3.org/2000/01/rdf-schema#>
>>> SELECT distinct ?place{
>>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>>> -117.13865) .
>>> }
>>>
>>> The same query in solr/lucene takes only 20ms.
>>>
>>> I wonder why fuseki or jena spatial is so slow.
>>>
>>> Any clue about it?
>>>
>>>
>>
>> --
>> Osma Suominen
>> D.Sc. (Tech), Information Systems Specialist
>> National Library of Finland
>> P.O. Box 26 (Kaikukatu 4)
>> 00014 HELSINGIN YLIOPISTO
>> Tel. +358 50 3199529
>> osma.suominen@helsinki.fi
>> http://www.nationallibrary.fi
>>
>
>
>
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suominen@helsinki.fi
http://www.nationallibrary.fi
Re: Spatial Jena
Posted by Samur Araujo <s....@geophy.com>.
Hi Osma, as you can see below, it makes no difference:
[2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' ::
[application/x-www-form-urlencoded charset=utf-8] ?
[2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: <
http://jena.apache.org/spatial#> PREFIX rdfs: <
http://www.w3.org/2000/01/rdf-schema#> SELECT distinct ?place { ?place
spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
[2017-01-09 09:07:16] Fuseki INFO [4] exec/select
[2017-01-09 09:07:16] Fuseki INFO [4] 200 OK (3.561 s)
[2017-01-09 09:07:21] Fuseki INFO [5] POST
http://localhost:3030/spatial/query
[2017-01-09 09:07:21] Fuseki INFO [5] POST /spatial :: 'query' ::
[application/x-www-form-urlencoded charset=utf-8] ?
[2017-01-09 09:07:21] Fuseki INFO [5] Query = PREFIX spatial: <
http://jena.apache.org/spatial#> PREFIX rdfs: <
http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
[2017-01-09 09:07:25] Fuseki INFO [5] exec/select
[2017-01-09 09:07:25] Fuseki INFO [5] 200 OK (4.350 s)
[2017-01-09 09:07:28] Fuseki INFO [6] POST
http://localhost:3030/spatial/query
[2017-01-09 09:07:28] Fuseki INFO [6] POST /spatial :: 'query' ::
[application/x-www-form-urlencoded charset=utf-8] ?
[2017-01-09 09:07:28] Fuseki INFO [6] Query = PREFIX spatial: <
http://jena.apache.org/spatial#> PREFIX rdfs: <
http://www.w3.org/2000/01/rdf-schema#> SELECT ?place { ?place
spatial:intersectBox (31.556 -117.128654 31.556 -117.128658) . }
[2017-01-09 09:07:34] Fuseki INFO [6] exec/select
[2017-01-09 09:07:34] Fuseki INFO [6] 200 OK (5.334 s)
I wonder why is so slow if the lucene index is so fast and the result set
contains only 17 resources.
On 9 January 2017 at 08:55, Osma Suominen <os...@helsinki.fi> wrote:
> Hi Samur!
>
> Does it help if you drop the DISTINCT?
>
> -Osma
>
>
> 09.01.2017, 09:49, Samur Araujo kirjoitti:
>
>> Hi all, I noticed that jena spatial is very slow.
>>
>> Query like the one below take 3s to execute (under entire geonames).
>>
>> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
>> <http://www.w3.org/2000/01/rdf-schema#>
>> SELECT distinct ?place{
>> ?place spatial:intersectBox (32.55668 -117.12865 32.56668
>> -117.13865) .
>> }
>>
>> The same query in solr/lucene takes only 20ms.
>>
>> I wonder why fuseki or jena spatial is so slow.
>>
>> Any clue about it?
>>
>>
>
> --
> Osma Suominen
> D.Sc. (Tech), Information Systems Specialist
> National Library of Finland
> P.O. Box 26 (Kaikukatu 4)
> 00014 HELSINGIN YLIOPISTO
> Tel. +358 50 3199529
> osma.suominen@helsinki.fi
> http://www.nationallibrary.fi
>
--
Senior Data Scientist
Geophy
www.geophy.com
Nieuwe Plantage 54-55
2611XK Delft
+31 (0)70 7640725
1 Fore Street
EC2Y 9DT London
+44 (0)20 37690760
Re: Spatial Jena
Posted by Osma Suominen <os...@helsinki.fi>.
Hi Samur!
Does it help if you drop the DISTINCT?
-Osma
09.01.2017, 09:49, Samur Araujo kirjoitti:
> Hi all, I noticed that jena spatial is very slow.
>
> Query like the one below take 3s to execute (under entire geonames).
>
> PREFIX spatial: <http://jena.apache.org/spatial#>PREFIX rdfs:
> <http://www.w3.org/2000/01/rdf-schema#>
> SELECT distinct ?place{
> ?place spatial:intersectBox (32.55668 -117.12865 32.56668 -117.13865) .
> }
>
> The same query in solr/lucene takes only 20ms.
>
> I wonder why fuseki or jena spatial is so slow.
>
> Any clue about it?
>
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suominen@helsinki.fi
http://www.nationallibrary.fi