[mapserver-users] slow access to PostGIS layer

G. Allegri giohappy at gmail.com
Wed Jun 27 15:53:56 PDT 2012


[cross posting from MS4W ml]

I'm working on a Windows 7 machine with PostGIS 1.5 on Postgresql 8.4, with
no tuning (default configuration).

I'm facing very bad performances when accessing a polygonal layer on
PostGIS.
The layer is not that heavy and complex. It is made by 20 polygons with
about 4000 to 56000 vertices.

The raw query (SELECT the_geom FROM mytable), performed through the psql
console, fetches the results in about 185 ms.
Logging the layer with DEBUG 5 shows that iterating over the features takes
about 7.5 s.
The time between consecutive msPostGISLayerNextShape calls is about 0.3/0.4
s.
Here is the log file: http://www.giovanniallegri.it/share/mspglog.txt

I obtain the same performances with ms4w 3.0.6(MapServer MapScript to
6.0.3) and 3.0.4_dev (MapServer and MapScript 6.1-dev), which
PostGIS is 1.5 on Postgresql 8.4, with no customized options.
I'm working on a Windows 7 machine, but the work should be deployed on a
Windows Server 2003.

I'm not using connection pooling, but I was facing similar performances
before disabling it.
giovanni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120628/894f5799/attachment.html>


More information about the mapserver-users mailing list