From: Uwe Bartels <uwe.bartels@gmail.com>
To: Віталій Тимчишин <tivv00@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: big distinct clause vs. group by
Date: Mon, 25 Apr 2011 21:01:09 +0200
Message-ID: <BANLkTikNf0fnrrZfUY6SdUQuGKSpdR5AcQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimV3yEF_Dq6rA+m0tfYkFAwwwYNPA@mail.gmail.com>
References: <AANLkTi=SwWco0mJcU549tzMXJ0kmBwCsNHabH8OUjg1M@mail.gmail.com>
<BANLkTimuvQr3Lvyh6T6fbKDs1v34Bi5=aQ@mail.gmail.com>
<BANLkTimPgtYKLyEE8K0NKoE=DAvgm7p8+A@mail.gmail.com>
<4B594466-0554-4AF8-A8BC-8FDA9C393DF9@gmail.com>
<BANLkTimV3yEF_Dq6rA+m0tfYkFAwwwYNPA@mail.gmail.com>
Hi Vitalii,
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:
>> > 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.
>>
>> 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.
>>
>>
> 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: uwe.bartels@gmail.com, tivv00@gmail.com, robertmhaas@gmail.com
Subject: Re: big distinct clause vs. group by
In-Reply-To: <BANLkTikNf0fnrrZfUY6SdUQuGKSpdR5AcQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox