X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2FB7F53482 for ; Mon, 2 May 2005 02:11:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32921-07 for ; Mon, 2 May 2005 05:11:52 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by svr1.postgresql.org (Postfix) with ESMTP id 89B6D5341C for ; Mon, 2 May 2005 02:11:51 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 34so2196342nzf for ; Sun, 01 May 2005 22:11:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WyTYIHyY19jcJcyDHVNU1G+ntnRt1t0LU+l+wVcvMb0+pTNVtqXHfCPfarLPWCoOgdzws1BgrpHwFHGtJLZ0Ww8xAys5bJXJBtAjp8Iygfm+IwD0vWZ+nJgEvTJ74O+uBzT6ujL3JXF2FWzKwb99iVWsfgiIdajnyyyMW1sOqz0= Received: by 10.36.8.17 with SMTP id 17mr483128nzh; Sun, 01 May 2005 22:11:52 -0700 (PDT) Received: by 10.36.74.19 with HTTP; Sun, 1 May 2005 22:11:52 -0700 (PDT) Message-ID: <674d1f8a0505012211d858cb6@mail.gmail.com> Date: Mon, 2 May 2005 10:41:52 +0530 From: Gourish Singbal Reply-To: Gourish Singbal To: weigelt@metux.de, pgsql-admin Subject: Re: measuring most-expensive queries In-Reply-To: <20050502031830.GC24546@nibiru.borg.metux.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050502031830.GC24546@nibiru.borg.metux.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.262 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200505/3 X-Sequence-Number: 17432 You could have made the following change in your conf file and reload the postgresql server. log_min_duration_statement =3D 10000 This will help you log the queries that take more than 10000 mili seconds to execute in your postgresql sever log file regards Gourish Singbal On 5/2/05, Enrico Weigelt wrote: >=20 > Hi folks, >=20 > I'd like to find out which queries are most expensive (taking very > long or producing high load) in a running system, to see what > requires further optimization. (the application is quite large > and some more folks involved, so I cant check evrything manually). >=20 > Well, the postmaster can log ev'ry single statement, but its > really too for a human person, to read the log files. >=20 > Is there any tool for that ? >=20 > thx > -- > --------------------------------------------------------------------- > Enrico Weigelt =3D=3D metux IT service > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact@metux.de > --------------------------------------------------------------------- > Realtime Forex/Stock Exchange trading powered by postgresSQL :)) > http://www.fxignal.net/ > --------------------------------------------------------------------- >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >=20 --=20 Best, Gourish Singbal