Re: Review: listagg aggregate - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Review: listagg aggregate
Date
Msg-id 162867791001280919u306afd90rfc3a61989eb023e7@mail.gmail.com
Whole thread Raw
In response to Re: Review: listagg aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Review: listagg aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2010/1/28 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> in 99.99% the second argument will be a constant. Can we use this
>> information and optimize function for this case?
>
>> The detoast on every row can take some percent from a performance.
>
> What detoast?  There won't be one for a constant, nor even for a
> variable in any sane situation --- who's going to be using
> multi-kilobyte delimiter values?  And if they do, aren't they likely
> to run out of memory for the result long before the repeated detoasts
> become an interesting problem?  You're arguing about a case that
> seems quite irrelevant to the real world.
>

I asking

with get_fn_expr_arg_stable() we are able to fix second parameter
without some performance issues.

Regards
Pavel


>                        regards, tom lane
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add on_trusted_init and on_untrusted_init to plperl [PATCH]
Next
From: Tom Lane
Date:
Subject: Re: Review: listagg aggregate