Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection; - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection;
Date
Msg-id 20081116164654.GC25476@svana.org
Whole thread Raw
In response to Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection;  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Sun, Nov 16, 2008 at 09:15:28AM -0500, Andrew Dunstan wrote:
> Oleg Serov wrote:
> >Hey, you are wrong, compile time is 1 ms, but not 100 ms, it hapens on
> >first plperl function call, it is perl init problem. not function
> >compilation.
> >
>
> Please do NOT top-answer - it makes threads totally unreadable.
>
> Is a one-off cost per connection of 100ms so bothersome?
>
> The alternative would be to start it up when the backend starts, but
> backend startup cost is already high, so that doesn't seem like a win.

If per-connection costs are a problem, then connection pooling usually
helps.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Enable script to generate preproc.y in build process.
Next
From: Tom Lane
Date:
Subject: Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection;