Re: abusing plpgsql array variables

Поиск
Список
Период
Сортировка
От Artacus
Тема Re: abusing plpgsql array variables
Дата
Msg-id 48C8AA4B.9050301@comcast.net
обсуждение исходный текст
Ответ на abusing plpgsql array variables  (Ben <bench@silentmedia.com>)
Ответы Re: abusing plpgsql array variables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> If I want to pass in a text[] argument to a plpgsql function, at what
> array size am I asking for problems? 100? 10,000? 100,000?
>
> What severity of problems might I encounter? Bad performance? Postgres
> refusing to run my query? A crashed backend?

Yeah, like you I was pretty worried about how it would handle using
larger arrays. But I was surprised to find that it did a super job of
handling even large arrays.

One warning though. If you are going to filter a table based on values
in a large array, don't do something like:

WHERE foo = ANY some_large_array

Instead explode it using a set returning function and join it like a table:

JOIN explode(some_large_array) e ON ...

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

Предыдущее
От: Artacus
Дата:
Сообщение: Re: using a GUI front end to postgres
Следующее
От: Greg Smith
Дата:
Сообщение: Re: psql scripting tutorials