X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id AF770D1B8B6 for ; Tue, 26 Aug 2003 13:01:48 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 44067-05 for ; Tue, 26 Aug 2003 13:01:38 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 783A8D1B8AB for ; Tue, 26 Aug 2003 13:01:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7QG1W5H027126; Tue, 26 Aug 2003 12:01:32 -0400 (EDT) To: Stephan Szabo Cc: Ang Chin Han , Rhaoni Chiu Pereira , PostgreSQL Performance Subject: Re: Query too slow In-reply-to: <20030826084326.M30963-100000@megazone.bigpanda.com> References: <20030826084326.M30963-100000@megazone.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Tue, 26 Aug 2003 08:47:52 -0700" Date: Tue, 26 Aug 2003 12:01:32 -0400 Message-ID: <27125.1061913692@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/334 X-Sequence-Number: 3150 Stephan Szabo writes: > On Tue, 26 Aug 2003, Ang Chin Han wrote: >> Veering aside a bit, since we usually pinpoint performance problems by >> looking at EXPLAIN ANALYZE's differences between the planner's >> estimation and actual execution's stats, what's involved in parsing the >> EXPLAIN ANALYZE results, and highlighting the places where they are way >> different? Bold, underline, or put some asterisks in front of those steps. > The hardest part is determining where it matters I think. You can use the > row counts as the base for that, but going from 1 row to 50 is not > necessarily going to be an issue, but it might be if a nested loop is > chosen. We've been chatting about this idea among the Red Hat group. The RHDB Visual Explain tool (get it at http://sources.redhat.com/rhdb/) already computes the percent of total runtime represented by each plan node. It seems like we could highlight nodes based on a large difference between estimated and actual percentage, or just highlight the nodes that are more than X percent of the runtime. regards, tom lane