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
|
Список | 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 по дате отправления: