Re: Review: listagg aggregate

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: listagg aggregate
Date: 2010-01-28 17:19:59
Message-ID: 162867791001280919u306afd90rfc3a61989eb023e7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/1/28 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-28 17:20:45 Re: Review: listagg aggregate
Previous Message Pavel Stehule 2010-01-28 17:17:50 Re: Review: listagg aggregate