Re: Planning large IN lists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Planning large IN lists
Дата
Msg-id 23045.1179408878@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Planning large IN lists  ("Atul Deopujari" <atul.deopujari@enterprisedb.com>)
Ответы Re: Planning large IN lists  ("Atul Deopujari" <atuld@enterprisedb.com>)
Список pgsql-hackers
"Atul Deopujari" <atul.deopujari@enterprisedb.com> writes:
> Hi,
> Tom Lane wrote:
>> That's the least of the problems.  We really ought to convert such cases
>> into an IN (VALUES(...)) type of query, since often repeated indexscans
>> aren't the best implementation.
>> 
> I thought of giving this a shot and while I was working on it, it 
> occurred to me that we need to decide on a threshold value of the IN 
> list size above which such transformation should take place.

I see no good reason to suppose that there is/should be a constant
threshold --- most likely it depends on size of table, availability of
indexes, etc.  Having the planner try it both ways and compare costs
would be best.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BufFileWrite across MAX_PHYSICAL_FILESIZE boundary
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Not ready for 8.3