Re: unexpected stable function behavior
От | Tom Lane |
---|---|
Тема | Re: unexpected stable function behavior |
Дата | |
Msg-id | 12872.1300123053@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: unexpected stable function behavior (Julius Tuskenis <julius@nsoft.lt>) |
Ответы |
Re: unexpected stable function behavior
|
Список | pgsql-performance |
Julius Tuskenis <julius@nsoft.lt> writes: > From the postgresql documentation about STABLE functions: "This > category allows the optimizer to optimize multiple calls of the function > to a single call." I thought that this means that optimizer executes the > function only for now parameter sets and stores results in some "cache" > and use it if the parameters are already known. No, it does not. That function property *allows* the optimizer to invoke the function fewer times than would happen in an un-optimized query. It does not *require* it to do so. There is no such cache mechanism in Postgres, and it's unlikely that there ever will be, because it probably would be a net performance loss on average. regards, tom lane
В списке pgsql-performance по дате отправления: