Re: O(n^2) aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: O(n^2) aggregates
Date: 2007-12-10 15:24:39
Message-ID: 13752.1197300279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> The solution to this would analogous to what we did to count(). We would need
> to add a field to ArrayMetaState which is stored in fn_extra to remember the
> last array returned. Then if array_push notices it has been called from an
> aggregate context it can store its result in there. The next time it would
> extend that array in place (which is code which doesn't currently exist),

contrib/intagg

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-10 15:24:57 Re: [HACKERS] BUG #3799: csvlog skips some logs
Previous Message Tom Lane 2007-12-10 15:19:47 Re: [HACKERS] BUG #3799: csvlog skips some logs