pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: explain analyze output: 0 rows, 1M loops
2+ messages / 2 participants
[nested] [flat]
* Re: explain analyze output: 0 rows, 1M loops
@ 2017-11-01 19:25 Justin Pryzby <pryzby@telsasoft.com>
0 siblings, 1 reply; 2+ messages in thread
From: Justin Pryzby @ 2017-11-01 19:25 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-general
On Wed, Nov 01, 2017 at 12:19:21PM -0700, David G. Johnston wrote:
> On Wed, Nov 1, 2017 at 11:59 AM, Scott Marlowe <scott.marlowe@gmail.com>
> wrote:
>
> > So some of my output from an explain analyze here has a line that says
> > this:
> >
> > ex Scan using warranty_order_item_warranty_order_id_idx on
> > warranty_order_item woi_1 (cost=0.57..277.53 rows=6 width=137) (actual
> > time=0.110..0.111 rows=0 loops=1,010,844)
> >
>
> Not my strong suit but, I'm pretty sure that reads: "The index was queried
> 1M+ times and none of those inqueries resulted in a record being found".
> IIUC I'd be wondering why some form of hash join wasn't used...
Except that:
https://www.postgresql.org/docs/current/static/using-explain.html
"... the loops value reports the total number of executions of the node, and
the actual time and ROWS VALUES SHOWN ARE AVERAGES PER-EXECUTION."
Justin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: explain analyze output: 0 rows, 1M loops
@ 2017-11-01 19:31 David G. Johnston <david.g.johnston@gmail.com>
parent: Justin Pryzby <pryzby@telsasoft.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2017-11-01 19:31 UTC (permalink / raw)
To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-general
On Wed, Nov 1, 2017 at 12:25 PM, Justin Pryzby <pryzby@telsasoft.com> wrote:
> On Wed, Nov 01, 2017 at 12:19:21PM -0700, David G. Johnston wrote:
> > On Wed, Nov 1, 2017 at 11:59 AM, Scott Marlowe <scott.marlowe@gmail.com>
> > wrote:
> >
> > > So some of my output from an explain analyze here has a line that says
> > > this:
> > >
> > > ex Scan using warranty_order_item_warranty_order_id_idx on
> > > warranty_order_item woi_1 (cost=0.57..277.53 rows=6 width=137) (actual
> > > time=0.110..0.111 rows=0 loops=1,010,844)
> > >
> >
> > Not my strong suit but, I'm pretty sure that reads: "The index was
> queried
> > 1M+ times and none of those inqueries resulted in a record being found".
> > IIUC I'd be wondering why some form of hash join wasn't used...
>
> Except that:
>
> https://www.postgresql.org/docs/current/static/using-explain.html
> "... the loops value reports the total number of executions of the node,
> and
> the actual time and ROWS VALUES SHOWN ARE AVERAGES PER-EXECUTION."
>
I seem to recall a somewhat recent commit that dealt with this. The
problem is that with 1M loops a small number of rows returned will be
indistinguishable from zero when computed as an average within finite
precision.
Seeing entire plans, and not just a single line of one, tends to help too.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-11-01 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 19:25 Re: explain analyze output: 0 rows, 1M loops Justin Pryzby <pryzby@telsasoft.com>
2017-11-01 19:31 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox