Received: from igcb.igc.apc.org (igcb.igc.apc.org [192.82.108.46]) by postgresql.org (Postfix) with ESMTP id AB1BB475991 for ; Sat, 2 Mar 2002 18:26:54 -0500 (EST) Received: from igce.igc.apc.org (igce [192.82.108.49]) by igcb.igc.apc.org (8.9.3/8.9.3) with ESMTP id PAA16324; Sat, 2 Mar 2002 15:24:46 -0800 (PST) Received: from sandino.dnsalias.org (localhost [127.0.0.1]) by igce.igc.apc.org (8.9.3/8.9.3) with SMTP id PAA28590; Sat, 2 Mar 2002 15:24:24 -0800 (PST) Content-Type: text/plain; charset="iso-8859-1" From: Scott Weikart To: pgsql-php@postgresql.org Subject: Re: resource logging to optimize DBMS queries: how match access_log to pg log? Date: Sat, 2 Mar 2002 15:25:41 -0800 X-Mailer: KMail [version 1.2] Cc: Scott Weikart References: <02030118361905.01861@sandino.dnsalias.org> In-Reply-To: <02030118361905.01861@sandino.dnsalias.org> MIME-Version: 1.0 Message-Id: <02030215254105.03865@sandino.dnsalias.org> Content-Transfer-Encoding: 8bit X-Archive-Number: 200203/2 X-Sequence-Number: 971 Responding to my own email... On Friday 01 March 2002 6:36 pm, Scott Weikart wrote: > But, how can I match the PHP log with the PID of the database > connection? Is there an SQL command I can run to find out my > connections PID, or some other identifier that I can put in > PostgreSQL's log? I just figured out the obvious solution to my first problem: don't rely on the PostgreSQL log, instead have the PHP application log the queries itself. However, I would still like to know the answer to this problem: > Also, is there a query I can run that will quantify the amount of > resources that PostgreSQL had to use to satisfy all the queries made > during the connection? -scott