EXPLAIN WITH

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: EXPLAIN WITH
Date: 2009-04-05 13:40:11
Message-ID: 603c8f070904050640tcff2fadwd12dc39fedfac3c4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm a bit unsatisfied with this output because it doesn't tell me the
plan it used to construct the CTE being scanned.

rhaas=# explain with wumpus as (select * from foo where id < 200)
select * from foo f, wumpus c, wumpus u where f.creator_id = c.id and
f.last_updater_id = u.id;
QUERY PLAN
-----------------------------------------------------------------------------
Hash Join (cost=31.44..74.94 rows=1000 width=36)
Hash Cond: (f.creator_id = c.id)
InitPlan
-> Seq Scan on foo (cost=0.00..18.50 rows=199 width=12)
Filter: (id < 200)
-> Hash Join (cost=6.47..36.22 rows=1000 width=24)
Hash Cond: (f.last_updater_id = u.id)
-> Seq Scan on foo f (cost=0.00..16.00 rows=1000 width=12)
-> Hash (cost=3.98..3.98 rows=199 width=12)
-> CTE Scan on wumpus u (cost=0.00..3.98 rows=199 width=12)
-> Hash (cost=3.98..3.98 rows=199 width=12)
-> CTE Scan on wumpus c (cost=0.00..3.98 rows=199 width=12)
(12 rows)

I haven't looked at what would be required to fix this, but I think we
should fix it before releasing 8.4.

...Robert

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2009-04-05 14:02:29 Re: Crash in gist insertion on pathological box data
Previous Message abdelhak benmohamed 2009-04-05 12:56:51 about hacking postgresql