From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: WIP Join Removal |
Date: | 2008-09-02 16:02:05 |
Message-ID: | 14800.1220371325@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>> Oh. How does the query look like after removing the join, then?
> Same answer, just slower. Removing the join makes the access to a into a
> SeqScan, whereas it was a two-table index plan when both tables present.
I don't really believe this: please show an actual case where the join
would be faster.
AFAICS, in the outer-join examples, it is not possible for a join to
enable some kind of indexscan on the outer table, because by definition
an outer join excludes none of the left-hand rows. So a seqscan on the
outer is optimal.
I also find all the worry about generating other plans for the inner
relation to be off the mark. You're not going to *use* any plan for the
inner rel, so who cares what plans it has?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-09-02 16:03:15 | Re: WIP Join Removal |
Previous Message | Tom Lane | 2008-09-02 15:39:29 | Re: rmgr hooks and contrib/rmgr_hook |