Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group