Re: GroupAggregate and Integer Arrays

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: David Osborne <david(at)qcode(dot)co(dot)uk>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: GroupAggregate and Integer Arrays
Date: 2015-10-23 16:15:42
Message-ID: CAMkU=1wS2ioBvb67zbqdu7TnH=-_x+3c9s88icrjWqts2_hBUA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Oct 23, 2015 at 7:29 AM, David Osborne <david(at)qcode(dot)co(dot)uk> wrote:

> Hi,
>
> Wondering if anyone could suggest how we could improve the performance of
> this type of query?
> The intensive part is the summing of integer arrays as far as I can see.
>

Postgres does not ship with any 'sum' function which takes array arguments.

> select sum('{1,2,3,4,5,6}'::int[]);

ERROR: function sum(integer[]) does not exist

Are you using a user defined function? If so, how did you define it?

Cheers,

Jeff

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Osborne 2015-10-23 16:26:26 Re: GroupAggregate and Integer Arrays
Previous Message David Osborne 2015-10-23 14:29:17 GroupAggregate and Integer Arrays