Re: The first function call

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: The first function call
Дата
Msg-id CAKFQuwaBpgbbe7=qd78j7ehwQ8x+AD+a41v_g2qf_suswE4giw@mail.gmail.com
обсуждение исходный текст
Ответ на The first function call  (Diego Silva e Silva <diegogrv@gmail.com>)
Список pgsql-hackers
On Thu, Jan 11, 2018 at 8:52 AM, Diego Silva e Silva <diegogrv@gmail.com> wrote:
Hello,

The first function call is 10 times slower than the other calls in the same session. Is it possible to shorten this long time on the first call?
For example. Call my function for once, this call returns at 70ms on the next call, the return is at 7ms.


You would need to provide considerably more detail about the function to receive any useful suggestions - there is no magic switch that you can throw to gain the benefits of caching.  Session pooling is usually the first solution to at least minimize how often the cache goes away.

David J.
P.S. ​This is not an on-topic question for the -hackers list, -general is a better location.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: The first function call
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: numeric regression test passes, but why?