Re: Questions regarding distinct operation implementation

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Questions regarding distinct operation implementation
Дата
Msg-id edc608b5-4d42-5329-edbd-139c46fc3fe0@postgresfriends.org
обсуждение исходный текст
Ответ на Re: Questions regarding distinct operation implementation  (Ankit Kumar Pandey <itsankitkp@gmail.com>)
Ответы Re: Questions regarding distinct operation implementation  (Ankit Kumar Pandey <itsankitkp@gmail.com>)
Список pgsql-hackers
On 12/4/22 14:34, Ankit Kumar Pandey wrote:
> 
> On 04/12/22 02:27, David Rowley wrote:
>>
> 
>> If you were to limit this to only working with the query you mentioned
>> in [1], i.e PARTITION BY without an ORDER BY, then you only need to
>> aggregate once per partition per aggregate and you only need to do
>> that once all of the tuples for the partition are in the tuplestore.
>> It seems to me like you could add all the records to a tuplesort and
>> then sort by the DISTINCT column then aggregate everything except for
>> consecutive duplicates. You can then aggregate any other aggregates
>> which share the same DISTINCT column, otherwise, you just destroy the
>> tuplesort and rinse and repeat for the next aggregate.
 >
> This looks like way to go that would ensure main use case of portability 
> from Oracle.

The goal should not be portability from Oracle, but adherence to the 
standard.
-- 
Vik Fearing




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Error-safe user functions
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: Error-safe user functions