Re: WIP Join Removal
Tom Lane <[email protected]> Tue, 02 Sep 2008 12:02:05 -0400
| Newsgroups | gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
Simon Riggs <[email protected]> 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 -- Sent via pgsql-patches mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches