X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 93C7811F65FC for ; Thu, 30 Mar 2006 11:24:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00885-07 for ; Thu, 30 Mar 2006 11:24:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7733B11F65DE for ; Thu, 30 Mar 2006 11:24:25 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k2UFONWR014953; Thu, 30 Mar 2006 10:24:23 -0500 (EST) To: Peter Eisentraut cc: Michael Stone , pgsql-performance@postgresql.org Subject: Re: Index scan startup time In-reply-to: <200603301716.13840.peter_e@gmx.net> References: <200603301359.11038.peter_e@gmx.net> <20060330132915.GL6811@mathom.us> <14358.1143728757@sss.pgh.pa.us> <200603301716.13840.peter_e@gmx.net> Comments: In-reply-to Peter Eisentraut message dated "Thu, 30 Mar 2006 17:16:13 +0200" Date: Thu, 30 Mar 2006 10:24:23 -0500 Message-ID: <14952.1143732263@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200603/624 X-Sequence-Number: 18061 Peter Eisentraut writes: > So from when to when is the startup time (the "x" in "x..y") actually > measured? When does the clock start ticking and when does it stop? > That is what's confusing me. The planner thinks of the startup time (the first estimated-cost number) as the time before the output scan can start, eg, time to do the sort in a sort node. EXPLAIN ANALYZE however reports the actual time until the first output row is delivered. When you've got a filter applied to the node result, as in this case, there can be a material difference between the two definitions, because of the time spent scanning rows that don't get past the filter. regards, tom lane