Re: Array performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Array performance
Дата
Msg-id 5000.1143215504@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Array performance  (Ruben Rubio Rey <ruben@rentalia.com>)
Ответы Re: Array performance  (Ruben Rubio Rey <ruben@rentalia.com>)
Список pgsql-performance
Ruben Rubio Rey <ruben@rentalia.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: K C Lau
Дата:
Сообщение: limitation using LIKE on ANY(array)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance problems with multiple layers of functions