From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | List pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: WIP Join Removal |
Date: | 2008-09-02 17:13:40 |
Message-ID: | 1220375620.4371.479.camel@ebony.2ndQuadrant |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Tue, 2008-09-02 at 12:28 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > As discussed on 26 June, "Join Removal/Vertical Partitioning", here's a
> > patch to remove joins in certain circumstances.
>
> Some points not made in the thread so far:
Various comments accepted and agreed.
> > + * XXX Seems not worth searching partial indexes because those
> > + * are only usable with a appropriate restriction, so the
> > + * only way they could ever be usable is if there was a
> > + * restriction that exactly matched the index predicate,
> > + * which is possible but generally unlikely.
>
> I haven't thought this through entirely, but wouldn't a partial index be
> okay if it's marked predOK? You might be right that the case is
> unlikely, but if it's only one extra line to support it ...
As of now, its it is predOK then that implies there was a qual on the
checkrel so can't remove the join. So no need to check.
> > + if (removable &&
> > + joinrel->cheapest_total_path < keeprel->cheapest_total_path)
>
> This test on cheapest_total_path seems pretty wacko
and stuff below it definitely is, from upthread discussion.
Hang fire on more comments - its a short patch but needs a few thwacks
from the cluestick yet before next review.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-09-02 17:18:37 | Re: WIP Join Removal |
Previous Message | Tom Lane | 2008-09-02 16:35:21 | Re: WIP Join Removal |