EXPLAIN ANALYZE bug/patch

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: EXPLAIN ANALYZE bug/patch
Date: 2002-10-10 09:20:54
Message-ID: 20021010092054.GB25467@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

As Niel so nicely pointed out this morning, the output of EXPLAIN ANALYZE is
not quite clear when branches of the query are never executed. So this tiny
patch fixes that.

The patch is attached and can also be found at:
http://svana.org/kleptog/pgsql/pgsql-explain.patch

--- Example of new output ---

template1=# explain analyze select 1 where exists (select 1 from pg_class
where relname = 's') and 0 = (select 1 from pg_proc);
QUERY PLAN
--------------------------------------------------------------------------------------------------------
Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.23..0.23 rows=0 loops=1)
One-Time Filter: ($0 AND (0 = $1))
InitPlan
-> Seq Scan on pg_class (cost=0.00..4.55 rows=1 width=0) (actual time=0.22..0.22 rows=0 loops=1)
Filter: (relname = 's'::name)
-> Seq Scan on pg_proc (cost=0.00..71.89 rows=1489 width=0) (never executed)
Total runtime: 0.31 msec
(7 rows)

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

Attachment Content-Type Size
pgsql-explain.patch text/plain 906 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Gavin Sherry 2002-10-10 14:16:39 Re: inline newNode()
Previous Message Karel Zak 2002-10-10 07:22:16 Re: inline newNode()