Re: Removing INNER JOINs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Removing INNER JOINs
Date
Msg-id 19367.1417628023@sss.pgh.pa.us
Whole thread Raw
In response to Re: Removing INNER JOINs  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Removing INNER JOINs  (Atri Sharma <atri.jiit@gmail.com>)
Re: Removing INNER JOINs  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> However, even granting that that is a concern, so what?  You *have* to
>> do the planning twice, or you're going to be generating a crap plan for
>> one case or the other.

> Yeah, I don't see a way around that..

Also, it occurs to me that it's only necessary to repeat the join search
part of the process, which means that in principle the mechanisms already
exist for that; see GEQO.  This means that for small join problems, the
total planning time would much less than double anyway.  For large
problems, where the join search is the bulk of the time, we could hope
that removal of unnecessary joins would reduce the join search runtime
enough that the second search would be pretty negligible next to the
first (which is not optional).  So I think "it'll double the runtime"
is an unfounded objection, or at least there's good reason to hope it's
unfounded.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Removing INNER JOINs
Next
From: Atri Sharma
Date:
Subject: Re: Removing INNER JOINs