Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F2842476310; Mon, 23 Sep 2002 10:31:35 -0400 (EDT) Received: from metrony.com (webware.metrony.com [207.159.131.106]) by postgresql.org (Postfix) with ESMTP id 371714762E1; Mon, 23 Sep 2002 10:31:35 -0400 (EDT) Received: from MetroNY.com ([66.9.109.130]) by metrony.com (8.11.0/8.11.0) with ESMTP id g8NEVNT13465; Mon, 23 Sep 2002 14:31:24 GMT (envelope-from aaron@MetroNY.com) Message-ID: <3D8F25B6.3090809@MetroNY.com> Date: Mon, 23 Sep 2002 10:31:18 -0400 From: Aaron Held User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roberto Mello Cc: Bruce Momjian , Neil Conway , pgsql-sql@postgresql.org, pgsql-general@postgresql.org Subject: Re: [SQL] Monitoring a Query References: <87znuc5tdm.fsf@mailbox.samurai.com> <200209230151.g8N1ptW22413@candle.pha.pa.us> <20020923134756.GB30392@cc.usu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/992 X-Sequence-Number: 30573 It looks like that just timestamps things in its connection pool, that is what I do now. What I would like is to know about queries that have not finished yet. -Aaron 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. > > -Roberto >