Re: Throwing unnecessary joins away

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Throwing unnecessary joins away
Дата
Msg-id 1137085382.3959.16.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: Throwing unnecessary joins away  (Ottó Havasvölgyi <havasvolgyi.otto@gmail.com>)
Ответы Re: Throwing unnecessary joins away
Список pgsql-performance
On Thu, 2006-01-12 at 11:00, Ottó Havasvölgyi wrote:
> Hi,
>
> I think it would be sufficient only for views. In other cases the
> programmer can optimize himself. But a view can be a join of other
> tables, and it is not sure that all of them are always needed. It all
> depends on what I select from the view.

The idea that you could throw away joins only works for outer joins.
I.e. if you did:

select a.x, a.y, a.z from a left join b (on a.id=b.aid)

then you could throw away the join to b.  But if it was a regular inner
join then you couldn't know whether or not you needed to join to b
without actually joining to b...

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

Предыдущее
От: Ottó Havasvölgyi
Дата:
Сообщение: Re: Throwing unnecessary joins away
Следующее
От: Andrew Lazarus
Дата:
Сообщение: Re: Please Help: PostgreSQL performance Optimization