Re: Propagating outer join conditions

Поиск
Список
Период
Сортировка
От Aaron Birkland
Тема Re: Propagating outer join conditions
Дата
Msg-id 19ab0ccd0612030830t68d9a7ddoba02f060fd9cdea4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Propagating outer join conditions  ("Jonathan Blitz" <jb@anykey.co.il>)
Список pgsql-performance
First, I forgot to mention - this is 8.2 RC1 I was trying on

The suggested change produces an identical 'bad' query plan.  The main
issue (I think) is that the query node that processes "t1 JOIN t11 ON
..' is not aware of the join condition 't28.s = t1.s'.. even though
the value of t28.s (as determined by the inner index scan where t28.o
= 'spec') could(should?) theoretically be known to it. If it did, then
I imagine it would realize that a nested loop join starting with t1.s
= t28.s (which is very selective) would be much cheaper than doing the
big merge join.

  -Aaron

On 12/3/06, Jonathan Blitz <jb@anykey.co.il> wrote:
> How about trying:
>
> Select *
> From
> (Select * from t28 where t28.0='spec')  t28a
> Left out join (t1 JOIN t11 ON
> > (t11.o = '<http://example.org>' AND t11.s = t1.o)) ON t28a.s = t1.s
>
> In this way, I think, the where clause on t28 would be performed before the
> join rather than after.

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Jonathan Blitz"
Дата:
Сообщение: Re: Propagating outer join conditions
Следующее
От: "Alexandru Coseru"
Дата:
Сообщение: Hardware advice