Re: big distinct clause vs. group by
От | Uwe Bartels |
---|---|
Тема | Re: big distinct clause vs. group by |
Дата | |
Msg-id | BANLkTikNf0fnrrZfUY6SdUQuGKSpdR5AcQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: big distinct clause vs. group by (Віталій Тимчишин <tivv00@gmail.com>) |
Список | pgsql-performance |
Hi Vitalii,
this sounds promising, can you send me that?
Best Regards,
Uwe
this sounds promising, can you send me that?
Best Regards,
Uwe
2011/4/25 Віталій Тимчишин <tivv00@gmail.com>
2011/4/23 Robert Haas <robertmhaas@gmail.com>On Apr 18, 2011, at 1:13 PM, Uwe Bartels <uwe.bartels@gmail.com> wrote:Oh, I see. min() is probably as good as anything. You could also create a custom aggregate that just always returns its first input. I've occasionally wished we had such a thing as a built-in.
> Hi Robert,
>
> thanks for your answer.
> the aggregate function I was talking about is the function I need to use for the non-group by columns like min() in my example.
> There are of course several function to choose from, and I wanted to know which causes as less as possible resources.I've once done "single" grouping function - it checks that all it's input values are equal (non-null ones) and returns the value or raises an error if there are two different values.Best regards, Vitalii Tymchyshyn
--
Best regards,
Vitalii Tymchyshyn
В списке pgsql-performance по дате отправления: