Re: [SQL] OFFSET impact on Performance??? - Mailing list pgsql-performance

From Greg Stark
Subject Re: [SQL] OFFSET impact on Performance???
Date
Msg-id 87651iv289.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: [SQL] OFFSET impact on Performance???  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-performance
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:

> what about
> CREATE AGGREGATE array_accum (
>     sfunc = array_append,
>     basetype = anyelement,
>     stype = anyarray,
>     initcond = '{}'
> );

huh, that is faster. It's only 14x slower than the C implementation.

For completeness, here are the fastest times I get after repeating a few times
each:

 13.97 ms     contrib/intagg C implementation
194.76 ms     aggregate using array_append
723.15 ms     aggregate with SQL state function

--
greg

pgsql-performance by date:

Previous
From: Alexandre Leclerc
Date:
Subject: Re: Flattening a kind of 'dynamic' table
Next
From: Kevin Brown
Date:
Subject: Re: [SQL] OFFSET impact on Performance???