From: Brent R. Matzelle <bmatzelle@yahoo.com>
To: pgsql-php@postgresql.org
Subject: Re: persistent vs. non-persistent
Date: Tue, 2 Oct 2001 09:06:33 -0700 (PDT)
Message-ID: <20011002160633.57751.qmail@web13007.mail.yahoo.com> (raw)
In-Reply-To: <008601c14b53$4c1507e0$5dd26383@corp.compucom.com>
--- Chris Ruprecht <chrup999@yahoo.com> wrote:
> Brent,
>
> given, that you keep the connection open indefinitely, how do
> you use it?
>
> Do I go and $db = pg_pconnect(...); when I first start apache
> and then never
> do a connect again, unless I re-start apache?
Not quite. When you run pg_pconnect() apache automatically
opens a PG connection and holds on to it until it dies or apache
is restarted. However, in order to use that database connection
again, for each PHP page you will need to re-run pg_pconnect().
Then apache will look for any httpd processes that have an
identical open PG connection. If there is one then it will use
that connection instead of creating a new one, thus saving you
the connection overhead.
You can read more about it here:
http://www.php.net/manual/en/features.persistent-connections.php
Brent
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: bmatzelle@yahoo.com
Subject: Re: persistent vs. non-persistent
In-Reply-To: <20011002160633.57751.qmail@web13007.mail.yahoo.com>
References: <008601c14b53$4c1507e0$5dd26383@corp.compucom.com> <20011002160633.57751.qmail@web13007.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox