Re: [SQL] OFFSET impact on Performance???

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: <gsstark(at)mit(dot)edu>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [SQL] OFFSET impact on Performance???
Date: 2005-01-28 00:14:46
Message-ID: 87651iv289.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Brown 2005-01-28 03:59:39 Re: [SQL] OFFSET impact on Performance???
Previous Message Alexandre Leclerc 2005-01-27 22:07:19 Re: Flattening a kind of 'dynamic' table