Re: Speed of user-defined aggregates using array_append as transfn

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Speed of user-defined aggregates using array_append as transfn
Date: 2016-10-28 19:33:41
Message-ID: c6cdc5e1-d0a1-08bd-e531-8162a678afcd@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/28/2016 03:14 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> My initial admittedly ugly thought was why not have a second append
>> function that doesn't use expanded arrays?
> That won't get us out of the O(N^2) behavior. Also I don't see what's
> better about it than my suggestion of making array_append itself do
> that when called as an aggregate function.
>
>

Probably nothing, I was just thinking out loud. That suggestion seems
like the most obviously back-patchable solution.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-10-28 20:16:05 Re: emergency outage requiring database restart
Previous Message Tom Lane 2016-10-28 19:14:17 Re: Speed of user-defined aggregates using array_append as transfn