Re: pgsql: Augment EXPLAIN output with more details on Hash nodes.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Augment EXPLAIN output with more details on Hash nodes.
Date: 2010-02-01 17:01:55
Message-ID: 603c8f071002010901r14556c67me4dc9abff293a501@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Feb 1, 2010 at 11:53 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> rhaas(at)postgresql(dot)org (Robert Haas) writes:
>> Log Message:
>> -----------
>> Augment EXPLAIN output with more details on Hash nodes.
>
> This needs to be damped down a bit.  It should not print useless
> non-information in cases where the plan wasn't actually run.
> Please compare show_sort_info.

Eh? When does it do that?

rhaas=# prepare foo as select * from pg_attribute a, pg_class c where
a.attrelid = c.oid and $1;
PREPARE
rhaas=# explain analyze execute foo (true);
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
Result (cost=12.76..95.19 rows=1955 width=357) (actual
time=1.972..21.777 rows=1973 loops=1)
One-Time Filter: $1
-> Hash Join (cost=12.76..95.19 rows=1955 width=357) (actual
time=1.960..15.679 rows=1973 loops=1)
Hash Cond: (a.attrelid = c.oid)
-> Seq Scan on pg_attribute a (cost=0.00..55.55 rows=1955
width=167) (actual time=0.013..2.902 rows=1973 loops=1)
-> Hash (cost=9.56..9.56 rows=256 width=194) (actual
time=1.828..1.828 rows=259 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 49kB
-> Seq Scan on pg_class c (cost=0.00..9.56 rows=256
width=194) (actual time=0.020..0.835 rows=259 loops=1)
Total runtime: 24.746 ms
(9 rows)

rhaas=# explain analyze execute foo (false);
QUERY PLAN
-------------------------------------------------------------------------------------------------
Result (cost=12.76..95.19 rows=1955 width=357) (actual
time=0.003..0.003 rows=0 loops=1)
One-Time Filter: $1
-> Hash Join (cost=12.76..95.19 rows=1955 width=357) (never executed)
Hash Cond: (a.attrelid = c.oid)
-> Seq Scan on pg_attribute a (cost=0.00..55.55 rows=1955
width=167) (never executed)
-> Hash (cost=9.56..9.56 rows=256 width=194) (never executed)
-> Seq Scan on pg_class c (cost=0.00..9.56 rows=256
width=194) (never executed)
Total runtime: 0.292 ms
(8 rows)

...Robert

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-02-01 17:12:09 Re: pgsql: Augment EXPLAIN output with more details on Hash nodes.
Previous Message Tom Lane 2010-02-01 16:53:04 Re: pgsql: Augment EXPLAIN output with more details on Hash nodes.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-02-01 17:05:19 Re: Hot Standby and deadlock detection
Previous Message Tim Bunce 2010-02-01 17:01:06 Re: Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH]