Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 34C28475E20; Mon, 23 Sep 2002 10:48:45 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id CB421474E61; Mon, 23 Sep 2002 10:48:41 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g8NEmU311122; Mon, 23 Sep 2002 10:48:30 -0400 (EDT) From: Bruce Momjian Message-Id: <200209231448.g8NEmU311122@candle.pha.pa.us> Subject: Re: [SQL] Monitoring a Query In-Reply-To: <20020923134756.GB30392@cc.usu.edu> To: Roberto Mello Date: Mon, 23 Sep 2002 10:48:30 -0400 (EDT) Cc: Neil Conway , Aaron Held , pgsql-sql@postgresql.org, pgsql-general@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/996 X-Sequence-Number: 30577 Roberto Mello wrote: > On Sun, Sep 22, 2002 at 09:51:55PM -0400, Bruce Momjian wrote: > > > > > > Would it be a good idea to add the time that the current query began > > > execution at to pg_stat_activity? > > > > What do people think about this? It seems like a good idea to me. > > OpenACS has a package called "Developer Support" that shows you (among > other things) how long a query took to be executed. Very good to finding > out slow-running queries that need to be optimized. 7.3 will have GUC 'log_duration' which will show query duration. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073