Re: Index optimization ?
От | Bo Lorentsen |
---|---|
Тема | Re: Index optimization ? |
Дата | |
Msg-id | 41EA9A40.2060106@netgroup.dk обсуждение исходный текст |
Ответ на | Re: Index optimization ? (Ragnar Hafstað <gnari@simnet.is>) |
Ответы |
Re: Index optimization ?
|
Список | pgsql-general |
Ragnar Hafstað wrote: >this has nothing to do with the return type. a volatile function is a >function that is not garanteed to return the same value given same >input parameters, (such as currval()). > >when a volatile function is used thus: > SELECT * FROM mytable WHERE col=myvolatilefunc(); >the planner must call the function once per table row, and assume >possibly different return values each time, so an indexscan will >not improve timings. > > Why not use the index scan for every row, is this a "limit" in the planner ? I think there is something in the planner I don't understand :-) >on the other hand, if the function is labeled STABLE, the planner >can assume that the same value will alway be returned, so only >one call to it can be made, and an indexscan might be found the >most effective. > > The two other function types are not interesting, but I don't understand the planners use of index optimization. /BL
В списке pgsql-general по дате отправления: