public inbox for [email protected]
help / color / mirror / Atom feedSubject: [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?
Date: Mon, 14 Apr 2014 07:28:58 +0900
Message-ID: <1F2A8D3FBCC3447391A3520631ACBD25@maumau> (raw)
In-Reply-To: <[email protected]>
References: <30A6B4B499494CED93770BBC4835840C@maumau>
<A832684586A84610AD7173AB42138F38@maumau>
<5F50DAFCABA4426FA54E9D8D0B78B38B@maumau>
<[email protected]>
From: "Thomas Hallgren" <thomas at tada.se>
> Interesting. What does your call into PL/Java (i.e. the function) look
> like? How often do you call it (I assume just once)?
Thank you for your response. I did:
1. Compiled BatchPL.java with JDK6, then ran "jar cf batch.jar
BatchPL.class".
2. Register the jar file with:
SELECT sqlj.install_jar('file:///some/dir/batch.jar', 'batch', false);
3. Create a Java stored function with:
CREATE FUNCTION batch(integer) RETURNS void
AS 'BatchPL'
LANGUAGE java;
4. Run "SELECT batch(10000);" from psql.
So, I understand that the number of calls from the Java function to PL/Java
is 10000. I hoped PL/Java reduces the function execution time dramatically
(by half or more) to make my colleagues get interested in PL/Java.
Regards
MauMau
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Subject: Re: [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?
In-Reply-To: <1F2A8D3FBCC3447391A3520631ACBD25@maumau>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox