Re: Meaning of "loops" in EXPLAIN ANALYSE output - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Meaning of "loops" in EXPLAIN ANALYSE output
Date
Msg-id 20060410151753.GD22409@svana.org
Whole thread Raw
In response to Re: Meaning of "loops" in EXPLAIN ANALYSE output  (Richard Huxton <dev@archonet.com>)
List pgsql-general
On Mon, Apr 10, 2006 at 04:08:01PM +0100, Richard Huxton wrote:
> Aaron Bingham wrote:
> >Unique  (cost=9775.21..10015.32 rows=1 width=8) (actual
> >time=264.889..264.889 rows=1 loops=791)
> >
> >Does that mean that the entire operation took 264.889 ms, or that a
> >single iteration took that long?  The time for the entire query would
> >suggest the latter interpretation
>
> You're quite right - multiply the time by the number of loop iterations
> to find the total.

Or rather, the time given is the total time divided by the number of
loops i.e. the average. It's done this way because the planning
estimate is also done on those terms (average per iteration not grand
total).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Meaning of "loops" in EXPLAIN ANALYSE output
Next
From: Tom Lane
Date:
Subject: Re: pg_restore 7.4.7 locks itself out