Hey All,

I just upgraded to a new machine (newer PostgreSQL, newer PostGIS, faster
CPU) and was dismayed to see my GeoServer performed a lot worse.

One of the problems turned out to be that the ST_Force_2D has been
depreciated, and now looks like this:

CREATE OR REPLACE FUNCTION postgis.st_force_2d(geometry)
 RETURNS geometry
 LANGUAGE sql
 IMMUTABLE STRICT
AS $function$ SELECT _postgis_deprecate('ST_Force_2d', 'ST_Force2D',
'2.1.0');
    SELECT ST_Force2D($1);
  $function$

The outcome of this is that it is much slower, as shown:

snapmaps=# select count(st_force2d(the_geom)) from water_area;
 count
--------
 927254
(1 row)

Time: 521.223 ms

snapmaps=# select count(st_force_2d(the_geom)) from water_area;
 count
--------
 927254
(1 row)

Time: 4139.768 ms

A test (not particularly big) test through Geoserver:

time wget -qO-
"http://localhost:8080/geoserver/psma/wms?LAYERS=terrapsma&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A3857&BBOX=10736535.265029,-5473866.3665441,17796334.870301,-976310.63345588&WIDTH=518&HEIGHT=330";
> /dev/null

real    0m2.733s
user    0m0.001s
sys     0m0.005s

Compared with a test when I have removed the call to _postgis_deprecate:

time wget -qO-
"http://localhost:8080/geoserver/psma/wms?LAYERS=terrapsma&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A3857&BBOX=10736535.265029,-5473866.3665441,17796334.870301,-976310.63345588&WIDTH=518&HEIGHT=330";
> /dev/null

real    0m2.037s
user    0m0.000s
sys     0m0.006s


All commands were run multiple times to avoid any cache warming issues.

If anything maybe a warning about this needs to be put in the documentation
somewhere?

Cheers,

James Sewell




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Performance-ST-Force-2D-vs-ST-Force2D-tp5156337.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to