Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYJZc-0002NQ-Kj for pgsql-admin@arkaria.postgresql.org; Mon, 21 Oct 2013 17:47:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VYJZc-0004eo-4E for pgsql-admin@arkaria.postgresql.org; Mon, 21 Oct 2013 17:47:24 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYJZb-0004d0-0w for pgsql-admin@postgresql.org; Mon, 21 Oct 2013 17:47:23 +0000 Received: from proofpoint2.mail.rice.edu ([128.42.201.101] helo=pp2.rice.edu) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYJZX-00042N-Fg for pgsql-admin@postgresql.org; Mon, 21 Oct 2013 17:47:21 +0000 Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id r9LHbrnu025082; Mon, 21 Oct 2013 12:47:19 -0500 Received: from mh10.mail.rice.edu (mh10.mail.rice.edu [128.42.201.30]) by pp2.rice.edu with ESMTP id 1fn85h016x-1; Mon, 21 Oct 2013 12:47:18 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh10.mail.rice.edu, auth channel X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh10.mail.rice.edu (Postfix) with ESMTP id 72EBC601F5; Mon, 21 Oct 2013 12:47:18 -0500 (CDT) Received: by aart.rice.edu (Postfix, from userid 18612) id 247191002AF; Mon, 21 Oct 2013 12:48:40 -0500 (CDT) Date: Mon, 21 Oct 2013 12:48:40 -0500 From: "ktm@rice.edu" To: Thara Vadakkeveedu Cc: "pgsql-admin@postgresql.org" Subject: Re: CPU usage by sqls Message-ID: <20131021174840.GA20049@aart.rice.edu> References: <48F1E182B1021B449414C85E713CE8250E61E0@WLT-MBX03.KRONOS.com> <1379975782.27726.YahooMailNeo@web125005.mail.ne1.yahoo.com> <1382372298.2702.YahooMailNeo@web125005.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1382372298.2702.YahooMailNeo@web125005.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.356191696649943 urlsuspect_oldscore=0.0564479769760425 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=173 rbsscore=0.356191696649943 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1310210076 X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Mon, Oct 21, 2013 at 09:18:18AM -0700, Thara Vadakkeveedu wrote: > Hi > Is there a way to get cpu utilization of various sql statements during a specific time period on postgresql ? > Say I start a performance test, I would like to collect a top sql report at the end of the test (like in sql server) that gives details of the top cpu consuming sqls.. > Also wondering if there is a sql profiler on postgressql that indicates the number of rows read and written to by sql statements, cpu cost, elapsed time etc during a profiled session. > thanks, > thara. Hi Thara, Have you looked at pgbadger? Cheers, Ken -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin