Re: self-join on subselect

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: self-join on subselect
Дата
Msg-id 20050127012436.GL67721@decibel.org
обсуждение исходный текст
Ответ на self-join on subselect  (PFC <lists@boutiquenumerique.com>)
Список pgsql-general
It's not at all clear what you're asking. Do you have a real example,
preferably with EXPLAIN output?

On Wed, Jan 26, 2005 at 11:12:25PM +0100, PFC wrote:
>
>     How do you do a self-join on a subselect ?
>
>     like
>     SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10
>
>     but without performing the subselect twice
> ..................................?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>

--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

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

Предыдущее
От: phil campaigne
Дата:
Сообщение: Numeric type
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: difficult JOIN