Re: Bad plan when join on function

Поиск
Список
Период
Сортировка
Искать
От
Kevin Grittner
Тема
Re: Bad plan when join on function
Дата
Msg-id
4D34576C02000025000396CB@gw.wicourts.gov
Список
Дерево обсуждения
Re: Bad plan when join on function "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Bad plan when join on function Pavel Stehule <pavel.stehule@gmail.com>
Re: Bad plan when join on function Tom Lane <tgl@sss.pgh.pa.us>
Re: Bad plan when join on function Pavel Stehule <pavel.stehule@gmail.com>
Zotov  wrote:
 
> select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
 
> Why SeqScan???
 
Because you don't have an index on AsInteger(c.id).
 
If your function is IMMUTABLE (each possible combination of input
values always yields the same result), and you declare it such, then
you can index on the function, and it will perform at a speed similar
to the other example.
 
-Kevin
В списке pgsql-performance по дате отправления
От: Tom Lane
Дата:
От: Jeremy Palmer
Дата:
FAQ