X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0DBE09FA7BA for ; Tue, 23 May 2006 15:08:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 18380-04 for ; Tue, 23 May 2006 15:07:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp1.ActiveState.com (gw.activestate.com [209.17.183.249]) by postgresql.org (Postfix) with ESMTP id B2E4C9FA380 for ; Tue, 23 May 2006 15:07:49 -0300 (ADT) Received: from smtp3.activestate.com (smtp3.activestate.com [192.168.3.19]) by smtp1.ActiveState.com (8.12.10/8.12.10) with ESMTP id k4NI7mhI001443 for ; Tue, 23 May 2006 11:07:48 -0700 (envelope-from mischa@ca.sophos.com) Received: from [192.168.99.210] (mallet.activestate.com [192.168.99.210]) by smtp3.ActiveState.com (8.13.4/8.13.4) with ESMTP id k4NI7lXa002752 for ; Tue, 23 May 2006 11:07:47 -0700 (envelope-from mischa@ca.sophos.com) Message-ID: <4473512E.7020805@ca.sophos.com> Date: Tue, 23 May 2006 11:15:10 -0700 From: Mischa Sandberg Reply-To: mischa@ca.sophos.com User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Selects query stats? References: <9C4E40CF-6C06-4297-AF32-A7EF2A3F3C0F@hi5.com> In-Reply-To: <9C4E40CF-6C06-4297-AF32-A7EF2A3F3C0F@hi5.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/430 X-Sequence-Number: 19217 Dan Gorman wrote: > All, > > I might be completely crazy here, but it seems every other database > exposes select query stats. Postgres only exposes > updates/deletes/inserts. Is there something I am missing here? Perhaps. You can EXPLAIN ANALYZE a SELECT, just like i/u/d -- but then you don't get the normal result set back. Is that what you mean? You can turn on log_min_duration_statement and get total SELECT duration logged. There's a thread in pgsql-hackers ("Re: Porting MSSQL to PGSQL: trace and profile") about server-side logging of query plans and stats (for all four of s/i/u/d), which is indeed not there in PG. -- Engineers think that equations approximate reality. Physicists think that reality approximates the equations. Mathematicians never make the connection.