agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] preload_libraries and pljava
4+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] preload_libraries and pljava
@ 2005-05-07 09:33  
  0 siblings, 1 reply; 4+ messages in thread

From:  @ 2005-05-07 09:33 UTC (permalink / raw)

Hi,
PostgreSQL 8.0 contains a feature called "preload_libraries" - libraries 
that are to be preloaded at server start. It is really useful. Can it be 
used with pljava ? What is the initialization function's name ?

Thanks.

ML





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* [Pljava-dev] preload_libraries and pljava
@ 2005-05-07 10:34  
  parent: 
  0 siblings, 1 reply; 4+ messages in thread

From:  @ 2005-05-07 10:34 UTC (permalink / raw)

Marek Lewczuk wrote:

> Hi,
> PostgreSQL 8.0 contains a feature called "preload_libraries" - 
> libraries that are to be preloaded at server start. It is really 
> useful. Can it be used with pljava ? What is the initialization 
> function's name ?

Sure, the pljava can be pre-loaded just like any other module. There is 
no particular initialization function though since PL/Java is 
initialized when the first call arrives so don't use a ':' in the 
preload entry for pljava.

A specific initialization function would probably be a good idea.

Regards,
Thomas Hallgren






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* [Pljava-dev] Re: preload_libraries and pljava
@ 2005-05-07 12:29  
  parent: 
  0 siblings, 1 reply; 4+ messages in thread

From:  @ 2005-05-07 12:29 UTC (permalink / raw)

Thomas Hallgren napisa?(a):
> Marek Lewczuk wrote:

> Sure, the pljava can be pre-loaded just like any other module. There is 
> no particular initialization function though since PL/Java is 
> initialized when the first call arrives so don't use a ':' in the 
> preload entry for pljava.
It's working... however I don't see any performance improvments. I have
this problem with all procedural languages - executing first functions 
takes about a 1 second. Is there any other solution to make pljava runs 
faster in first execution ?

Thanks for help.

ML





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* [Pljava-dev] Re: preload_libraries and pljava
@ 2005-05-07 14:46  
  parent: 
  0 siblings, 0 replies; 4+ messages in thread

From:  @ 2005-05-07 14:46 UTC (permalink / raw)

Marek Lewczuk wrote:

> Thomas Hallgren napisa?(a):
>
>> Marek Lewczuk wrote:
>
>
>> Sure, the pljava can be pre-loaded just like any other module. There 
>> is no particular initialization function though since PL/Java is 
>> initialized when the first call arrives so don't use a ':' in the 
>> preload entry for pljava.
>
> It's working... however I don't see any performance improvments. I have
> this problem with all procedural languages - executing first functions 
> takes about a 1 second. Is there any other solution to make pljava 
> runs faster in first execution ?

No, not really. PL/Java must initialize a Java VM at some point before 
the first call is processed. That will inevitably take some time. A 
connection pool that enables connection reuse is generally the best 
solution. PL/Java is not designed to perform well when connections are 
frequently dropped and re-established.

Regards,
Thomas Hallgren






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-05-07 14:46 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07 09:33 [Pljava-dev] preload_libraries and pljava 
2005-05-07 10:34 ` 
2005-05-07 12:29   ` 
2005-05-07 14:46     ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox