Re: self join revisited

Поиск
Список
Период
Сортировка
От Rikard Pavelic
Тема Re: self join revisited
Дата
Msg-id 49D3B56D.9050802@zg.htnet.hr
обсуждение исходный текст
Ответ на Re: self join revisited  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: self join revisited  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
Tom Lane wrote:
> Rikard Pavelic <rikard.pavelic@zg.htnet.hr> writes:
>
>> It would be great if Postgres could rewrite this query
>>
>
> AFAICS those queries are not going to produce the same results,
> so Postgres would be 100% incorrect to rewrite it like that for you.
>
> (If they do produce the same results, it would depend on a bunch
> of assumptions you have not stated.)
>
>             regards, tom lane
>

Can I try again? :)

How hard would it be to teach the planner about preserving uniqueness of
relations in subqueries?
And using that information to remove unnecessary self joins on unique sets?

I can try to rewrite some queries to test it on real data for how much
gain it would provide.

Regards,
Rikard

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

Предыдущее
От: Matthew Wakeling
Дата:
Сообщение: Re: Very specialised query
Следующее
От: Stef Telford
Дата:
Сообщение: Re: Raid 10 chunksize