Re: Merge Joins and Views - Mailing list pgsql-general

From Tom Lane
Subject Re: Merge Joins and Views
Date
Msg-id 8713.1206807320@sss.pgh.pa.us
Whole thread Raw
In response to Re: Merge Joins and Views  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Don't hold your breath though --- it'll take major planner surgery.

> In this case isn't all the planner needs the pathkey list to give it a hint
> that that ordering might be useful?

You could maybe make that work if you were willing to speculatively
re-plan the entire subquery for each potentially useful ordering.
I think that would chew an unacceptable number of cycles though.
The upper planner doesn't have any clue about what indexes are available
in the lower query, so it would end up requesting a lot of useless
re-plans.

In any case the nullable-targetlist restriction causes a whole lot
of other problems that this wouldn't address.  I'd rather spend my
time on solving the more general problem.

            regards, tom lane

pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Merge Joins and Views
Next
From: Tom Lane
Date:
Subject: Re: Merge Joins and Views