Re: alternate idioms for large "IN (...)" lists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: alternate idioms for large "IN (...)" lists
Дата
Msg-id 12990.1023147511@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: alternate idioms for large "IN (...)" lists  (russm <russm@icorp.com.au>)
Список pgsql-sql
russm <russm@icorp.com.au> writes:
> Just out of curiosity, why does postgresql's IN perform so poorly?

Because no one's gotten around to improving it.

The current implementation is actually just fine for small numbers of
values in the IN-list.  Making it work nicely for large numbers of
values without pessimizing the small-list case would involve supporting
(at least) two implementations and teaching the planner how to choose
one.  This definitely should be done, but has not gotten to the top of
anyone's to-do queue.

Most of the complaints we've seen about IN performance have to do with
the IN-subselect case, which is yet a different animal.  It's likely
that that will get fixed before anyone worries about the large-number-
of-scalar-values case...
        regards, tom lane


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

Предыдущее
От: "Marie G. Tuite"
Дата:
Сообщение: passing a list to a function and returning a recordset
Следующее
От: "Sandeep Chibber"
Дата:
Сообщение: Postgres Function Problem