From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Speed of user-defined aggregates using array_append as transfn
Date: Fri, 28 Oct 2016 15:14:17 -0400
Message-ID: <12587.1477682057@sss.pgh.pa.us> (raw)
In-Reply-To: <0b14ae5b-dc6a-8545-c3d8-63566ed0a43a@dunslane.net>
References: <6315.1477677885@sss.pgh.pa.us>
<0b14ae5b-dc6a-8545-c3d8-63566ed0a43a@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andrew Dunstan <andrew@dunslane.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.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net
Subject: Re: Speed of user-defined aggregates using array_append as transfn
In-Reply-To: <12587.1477682057@sss.pgh.pa.us>
References: <6315.1477677885@sss.pgh.pa.us> <0b14ae5b-dc6a-8545-c3d8-63566ed0a43a@dunslane.net> <12587.1477682057@sss.pgh.pa.us>
* 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