Re: IN or ANY for batch queries

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: IN or ANY for batch queries
Дата
Msg-id CAMsr+YGHv96JK875v4n83rV_uPwi4J6VndfMPpjFeMJc5TKuZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: IN or ANY for batch queries  (Charles Pritchard <chuck@jumis.com>)
Список pgsql-jdbc
PostgreSQL translates IN (...) to = ANY(ARRAY[...]) internally. They're largely the same thing.

In theory for small IN lists it could specialize the query into a union with specialized plans for different values, but it doesn't do that.

Charles is right. For smaller sets use either form, whatever is convenient. For larger sets create a temp table, COPY to populate it, create indexes on it if you need to, and join on it.

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

Предыдущее
От: Charles Pritchard
Дата:
Сообщение: Re: IN or ANY for batch queries
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: IN or ANY for batch queries