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 BFF5E9FA169 for ; Tue, 23 May 2006 15:52:13 -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 29146-03-3 for ; Tue, 23 May 2006 15:52:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by postgresql.org (Postfix) with ESMTP id 8137E9FA92E for ; Tue, 23 May 2006 15:51:28 -0300 (ADT) Received: from [195.112.19.37] (helo=[192.168.0.7]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1FibyU2HO7-0001pA; Tue, 23 May 2006 20:51:23 +0200 Subject: Re: Selects query stats? From: Simon Riggs To: Dan Gorman Cc: mischa@ca.sophos.com, pgsql-performance@postgresql.org In-Reply-To: <127D68F6-7620-4A62-8D1A-9B475E7571CD@hi5.com> References: <9C4E40CF-6C06-4297-AF32-A7EF2A3F3C0F@hi5.com> <4473512E.7020805@ca.sophos.com> <82252882-2A15-4823-A517-7AB3161889D1@hi5.com> <4473553C.1010804@ca.sophos.com> <127D68F6-7620-4A62-8D1A-9B475E7571CD@hi5.com> Content-Type: text/plain Date: Tue, 23 May 2006 19:51:12 +0100 Message-Id: <1148410273.2755.179.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de login:726643fe08f41a451f0fe7fa43bce239 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/435 X-Sequence-Number: 19222 On Tue, 2006-05-23 at 11:33 -0700, Dan Gorman wrote: > In any other DB (oracle, mysql) I know how many queries (selects) per > second the database is executing. How do I get this > number out of postgres? > > > I have a perl script that can test this, but no way the db tells me > how fast it's going. > > > (e.g. in oracle: select sum(executions) from v$sqlarea;) The Oracle query you show doesn't do that either. It tells you how many statements have been executed since startup, not per second. The main problem with what you ask is it only seems to have value. If the value dips for some reason, you have no way of knowing whether that occurred because the arrival rate dropped off, there is a system problem or whether statements just happened to access more data over that time period. You can collect information that would allow you to understand what is happening on your system and summarise that as you choose. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com