Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D8C7C475CC4; Mon, 23 Sep 2002 20:28:17 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id C2DED474E53; Mon, 23 Sep 2002 20:28:15 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g8O0Ru512898; Mon, 23 Sep 2002 20:27:56 -0400 (EDT) From: Bruce Momjian Message-Id: <200209240027.g8O0Ru512898@candle.pha.pa.us> Subject: Re: [SQL] Monitoring a Query In-Reply-To: <20020923220116.GE2180@cc.usu.edu> To: Roberto Mello Date: Mon, 23 Sep 2002 20:27:56 -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/1042 X-Sequence-Number: 30623 Roberto Mello wrote: > On Mon, Sep 23, 2002 at 10:48:30AM -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. > > Forgive my ignorance here, but what is GUC? And how would I access the > query duration? GUC is postgresql.conf and SET commands. They are variables that can be set. -- 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