Hi,

Spatial index can only speed up the data access if it leads to selective query. 
In practice it means that the bounding box of the query is small. If your 
GetMap is reading the whole extent of your data then every single feature from 
the data must be read. In that case spatial index makes the query somewhat 
slower than without the index because the index must be checked first but it 
does not remove anything from the final query.

Did you do your test with a big BBOX or a small BBOX? In the first case no 
speed-up is what you can await but in the latter case the spatial index should 
give noticeable improvement. Here is some more information 
https://sourceforge.net/p/geotools/mailman/message/36174484/

-Jukka Rahkonen-


Lähettäjä: adrianap sanchez [mailto:adrisanh...@gmail.com]
Lähetetty: 4. helmikuuta 2018 16:24
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] Geoserver 2.12.1 and spatial index.

Hi.

I have a question, the last week i was publishing with geoserver one WMS 
service, based in one and only vector layer  in geopackage (gpkg), With 
geoserver 2.1.12 plugin .

I was generate the GPKG file previous with two options: QGIS 2.18, and when 
export i was select the option (create spatial index).

Another form to creating the geopackage with ogr2ogr, not with QGIs, And I 
verify that it has spatial index.

With both the same results in geoserver wms publish.

After publishing the wms service, I was founding that the request getmap in 
geoserver for wms returns the png image slowly, a lot of time for response (5 
minutes). Compared with other wms based  in shapefile (1 minute), (whith the 
same shapefile i was creating the gpkg), the wms service based in shapefile 
returns the png (getmap) image with 80% less time.

The geopackage file that i use is nearly to 1Gb, more than one million lines, 
and has spatial index. The shapefile is 500 mb more greater than the gpkg. At 
my desktop station  (imac pro 2017-64gb ram) render fine in qgis 2.18, with 
times to render more or less equal. (2 minutes), for shapefile and gpkg file.

 my server has 100Gb Ram, xeon processors, is a good machine in theory for this 
task, and i prepare geoserver 2.12 for production.

My question is:

geoserver 2.12.1 with the extension geopackage support the spatial index 
(geopackage) how mechanism for optimizing access to data??
  In theory for me the request getmap for the wms service (layer gpkg)  in 
format PNG should recover more faster the results, or nearly to the time 
reponse for wms based in the shapefile layer.

Thank u.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to