pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: gsstark@mit.edu
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] OFFSET impact on Performance???
Date: 27 Jan 2005 19:14:46 -0500
Message-ID: <87651iv289.fsf@stark.xeocode.com> (raw)
In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB3412A75F3@Herge.rcsinc.local>
References: <6EE64EF3AB31D5448D0007DD34EEB3412A75F3@Herge.rcsinc.local>


"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




view thread (50+ messages)  latest in thread

Message-ID: <87651iv289.fsf@stark.xeocode.com>
Permalink:  ../87651iv289.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87651iv289.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, merlin.moncure@rcsonline.com
  Subject: Re: [SQL] OFFSET impact on Performance???
  In-Reply-To: <87651iv289.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox