Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9C0662E0048 for ; Wed, 27 Feb 2008 07:54:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84969-04 for ; Wed, 27 Feb 2008 07:54:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.185]) by postgresql.org (Postfix) with ESMTP id 85FB72E0045 for ; Wed, 27 Feb 2008 07:54:02 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id g13so1944077rvb.43 for ; Wed, 27 Feb 2008 03:54:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=aAwuV8uqApRYsWPUZCXc6sv+9TKCri0+xk1JfyfyG34=; b=Bf/M54dBdv3VOJ/hwz+pvGpTUzq9L+BgrwuTqU/XpuaJgEP42Gr59W2sBtJ48ZW3YQDU2UC1yiO0QcJM19GKmyLT3LZ2kNjOi63KXkshMvQjDQlm1RCQD1U7OQxWNYqdtywZEjNI0tCTE+WH5QOxDzztx0zAQDIwe1PS5C4FzAA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eOzdiCp1FRE1afV5+pyNzecyDZ9chWOZK6qQFbMfPacHX0LfXguY6OJGayZdVFjXf4a+B5GSZ3GMrbzN39q0P2dGz2wrjKisjk3rv02ZmpYNgAR/Xqd59vyjVyRKOfw+aTvXxdaY1ULz2JCtWv5S3le7hEd632G6+7aTotEvVG0= Received: by 10.141.141.3 with SMTP id t3mr4407363rvn.52.1204113241705; Wed, 27 Feb 2008 03:54:01 -0800 (PST) Received: by 10.64.195.18 with HTTP; Wed, 27 Feb 2008 03:54:01 -0800 (PST) Message-ID: Date: Wed, 27 Feb 2008 12:54:01 +0100 From: "Frits Hoogland" To: pgsql-performance@postgresql.org Subject: how to identify expensive steps in an explain analyze output In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15053_11541667.1204113241628" References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/369 X-Sequence-Number: 28911 ------=_Part_15053_11541667.1204113241628 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've got some long running queries, and want to tune them. Using simple logic, I can understand what expensive steps in the query plan ought to be (seq scan and index scans using much rows), but I want to quantify; use a somewhat more scientific approach. The manual states: "Actually two numbers are shown: the start-up time before the first row can be returned, and the total time to return all the rows.". Does this mean that the difference between the first and second is the cost or the time the step in the explain has taken? TIA frits ------=_Part_15053_11541667.1204113241628 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I've got some long running queries, and want to tune them.
Using simple logic, I can understand what expensive steps in the query plan ought to be (seq scan and index scans using much rows), but I want to quantify; use a somewhat more scientific approach.

The manual states: "Actually two numbers are shown: the start-up time before the first row can be returned, and the total time to return all the rows.". Does this mean that the difference between the first and second is the cost or the time the step in the explain has taken?

TIA

frits
------=_Part_15053_11541667.1204113241628--