Received: from tomts6-srv.bellnexxia.net (tomts6.bellnexxia.net [209.226.175.26]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0VKXJl59698 for ; Thu, 31 Jan 2002 15:33:19 -0500 (EST) (envelope-from fbax@sympatico.ca) Received: from ACER ([65.94.209.155]) by tomts6-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP id <20020131203319.NHG25557.tomts6-srv.bellnexxia.net@ACER>; Thu, 31 Jan 2002 15:33:19 -0500 Message-Id: <3.0.6.32.20020131152838.007c9de0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Thu, 31 Jan 2002 15:28:38 -0500 To: Marco Colombo From: Frank Bax Subject: Re: pg_pconnect - ?? Cc: Chris Ruprecht , PostGreSQL PHP Group In-Reply-To: References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Archive-Number: 200201/98 X-Sequence-Number: 901 At 09:09 PM 1/31/02 +0100, Marco Colombo wrote: >On Mon, 28 Jan 2002, Frank Bax wrote: >> If your postgres database is on the same server as you webserver, there is >> neglible gains for using pconnect over connect. > >Well, it depends on the type of queries. For *a lot* of very simple and >fast queries performed by the same user (like readonly selects in a single >user environment), the TCP connect and fork/exec (of the postgres backends) >overhead may dominate. Of course, whenever the query time dominates, >it makes hardly a difference. Ah, I hadn't considered that, query time dominates all my scripts. Another thing I've noticed. Just for the record ... Persistent connections do appear to go away after time. When I used them on my relatively idle (compared to many) server, there almost always were none early in the morning. With non-scientific methods, and random observations I determined that the time period was probably between one hour and one day. Too bad all this info about factors affecting pg_pconnect weren't all in one place... Frank