Re: O(n^2) aggregates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: O(n^2) aggregates
Date
Msg-id 13752.1197300279@sss.pgh.pa.us
Whole thread Raw
In response to O(n^2) aggregates  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #3799: csvlog skips some logs
Next
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] BUG #3799: csvlog skips some logs