Re: Array performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ruben Rubio Rey <ruben(at)rentalia(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Array performance
Date: 2006-03-24 15:51:44
Message-ID: 5000.1143215504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Ruben Rubio Rey <ruben(at)rentalia(dot)com> writes:
> SELECT (array[20]+array[21]+ ... +array[50]+array[51]) as total
> FROM table
> WHERE
> (array[20]+array[21]+ ... +array[50]+array[51])<5000
> AND array[20]<>0
> AND array[21]<>0
> ...
> AND array[50]<>0
> AND array[51])<>0

> Any ideas to make this query faster?

What's the array datatype? Integer or float would probably go a lot
faster than NUMERIC, if that's what you're using now.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-03-24 16:02:34 Re: Performance problems with multiple layers of functions
Previous Message K C Lau 2006-03-24 15:25:00 limitation using LIKE on ANY(array)