mapserver postgis connection

Frank Warmerdam warmerdam at POBOX.COM
Fri Oct 28 06:01:37 PDT 2005


On 10/28/05, Frans Knibbe <frans at geodan.nl> wrote:
> An interesting thread.
> Shouldn't the connection step go faster if you have FastCGI enabled in
> the MapServer?

Frans,

My understanding is that PostGIS connection times are very fast
so FastCGI is unlikely to give much benefit.  However, if you have
many PostGIS layers in the map, I would encourage at least using
the CLOSE_CONNECTION=DEFER processing option to ensure
the same connection is used for all the layers.  This does not require
FastCGI.   FastCGI basically just allows preserving the connection
from cgi request to cgi request.

> Also, I wonder if PostGIS would improve relative to shapefile if you
> have many concurrent users requesting the same data...

I am dubious about that.  The operating system will already preserve
the shapefile data in RAM from request to request.  I would think
that PostGIS would pay off in speed in cases that shapefiles don't
optimize well, for instance if you want to filter out most data based
on an attribute column, that could be done very fast in Postgres.

Other than that, as folks mention Postgres' big benefit is flexability
of data integration and updatability.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list