Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D32CA2E003E for ; Wed, 27 Feb 2008 06:18:29 -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 56851-06 for ; Wed, 27 Feb 2008 06:18:26 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by postgresql.org (Postfix) with ESMTP id 4BBAB2E003D for ; Wed, 27 Feb 2008 06:18:26 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so4596403pye.29 for ; Wed, 27 Feb 2008 02:18:25 -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:mime-version:content-type; bh=saZfc9+HaVTv1PiPKjlPkjzdRIoqllkpQDmTuLD/Mjo=; b=ntuxz+ntt/yRIiUJsNWefn6ddLJd+vo5upht8gLGHX/kV/zkBT8HFYk13BqxAF08JBWtZjo5jjihs/K2fbemViTr7kfEJ/WfDr/vE4Yhd3IuC3Doh9APJNvo7iaIoZSgJINfcTxQFYbjPYk9zV4usCgipEQo5zBgxuYU8hpdoa8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=wniL+/PFc7r/D4uk2GI5gwaljdQ72kfsSIbki96pRClAF6Fqbx80aofH4bysw9wWz93OGLknDKQsL7xLoF9xo/UdQNmdcOtimeaAtcPWJkCUHIbfCfv7tzLs8T04B9rT3Kq8I+Z9Evz5zM5eyeu+0t3WcyhB9ZQ47z6DkHaaYN0= Received: by 10.64.242.5 with SMTP id p5mr11284479qbh.31.1204107505104; Wed, 27 Feb 2008 02:18:25 -0800 (PST) Received: by 10.64.195.18 with HTTP; Wed, 27 Feb 2008 02:18:25 -0800 (PST) Message-ID: Date: Wed, 27 Feb 2008 11:18:25 +0100 From: "Frits Hoogland" To: pgsql-performance@postgresql.org Subject: how to identify expensive steps in an explain analyze output MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14838_2558249.1204107505098" 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/368 X-Sequence-Number: 28910 ------=_Part_14838_2558249.1204107505098 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_14838_2558249.1204107505098 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_14838_2558249.1204107505098--