Re: union vs. sort

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: union vs. sort
Дата
Msg-id 24947.1081362055@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: union vs. sort  (Karel Zak <zakkr@zf.jcu.cz>)
Ответы Re: union vs. sort  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-hackers
Karel Zak <zakkr@zf.jcu.cz> writes:
> On Tue, Apr 06, 2004 at 10:33:25AM -0400, Tom Lane wrote:
>> This isn't simply a matter of "omitting the sort".

>  I didn't  talk about  "Append" result,  but about  "Unique" result. The
>  ORDER BY  in UNION  query works  with final  concanated data  -- that's
>  right. My question is why a result from this ORDER BY is again sorted:

Oh, okay, that's just something that never got done, per this old
comment:
       /*        * We set current_pathkeys NIL indicating we do not know sort        * order.  This is correct when the
topset operation is UNION        * ALL, since the appended-together results are unsorted even if        * the subplans
weresorted.  For other set operations we could be        * smarter --- room for future improvement!        */
 

I've committed changes to do the right thing in CVS tip.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: locale
Следующее
От: Tom Lane
Дата:
Сообщение: Re: locale