[postgis-users] MapServer PostgreSQL and persistent databaseconnections
Paul Ramsey
pramsey at refractions.net
Fri Jul 11 08:34:28 PDT 2003
Hi Jan,
Sorry, I really do not know. Oracle is multi-threaded, so it is not like
they have to start a new backend for every new process.
Paul
Jan Hartmann wrote:
> Paul, do you know WHY Oracle / SDE have such long connection times,
> compared to PostgreSQL? Is there some added functionality/bookkeeping
> invoved?
>
> Jan
>
> Paul Ramsey wrote:
>
>> The eternal question, to connection pool or not to connection pool. :)
>> The reason why connection pooling is considered an important problem
>> for enterprise application developers is... because Oracle is really
>> slow at establishing a connection. Really, that is why! PostgreSQL
>> connections times are inconsequential. In the context of a process as
>> computationally intensive as Mapserver, PgSQL connections times might
>> as well be considered to be zero.
>> This gets discussed every month or so on the Mapserver list, and the
>> bottom line is that 99% of your processing time for a given map
>> creation will be spent retrieving and rendering the data. Connection
>> time for PostgreSQL is completely ignorable in term of impact on
>> system load. For Oracle and ArcSDE, connection time is non-trivial,
>> and that is a problem.
>> Because there are some connection time issues with some of the
>> backends, for Mapserver 4.0 there has been an enhancement to ensure
>> that database connections are pooled PER MAPPING INVOCATION. So within
>> a particular instantiation of the mapserv CGI, only one connection to
>> each database is used. So if I have 15 ArcSDE layers in my map, I will
>> only connect ONCE, not 15 times.
>> The infrastructure of inter-layer connection pooling exists in
>> Mapserver 4.0, and has been implemented on ArcSDE connections only, so
>> far, but is completely reusable for OracleSpatial and PgSQL layers.
>> The implementation for those layers just needs to be done.
>>
>> Yours,
>> Paul
>>
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list