Re: Pl/Perl speed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Pl/Perl speed
Дата
Msg-id 12972.1074018892@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Pl/Perl speed  ("Chris Ochs" <chris@paymentonline.com>)
Список pgsql-general
"Chris Ochs" <chris@paymentonline.com> writes:
> I am pretty sure I know this already, but every time you run a Pl/Perl
> function it is just like running a perl script as far as having to load and
> compile the code right?

No, the perl script gets compiled only the first time the function is
invoked (within a given backend session).  Subsequent calls to the
function use the already-compiled function object.  I'm not clear on
exactly how much overhead this saves in Perl, but it's certainly not
as bad as re-loading a script on each call.

I believe all the PL languages have comparable optimizations.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Best practice? Web application: single PostgreSQL
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Nested transaction - I am a bank ??