public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?
Date: Mon, 14 Apr 2014 21:32:35 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <D40AEDF3497A484BBCC1DEB79CD5CB3E@maumau>
References: <30A6B4B499494CED93770BBC4835840C@maumau>
	<A832684586A84610AD7173AB42138F38@maumau>
	<5F50DAFCABA4426FA54E9D8D0B78B38B@maumau>
	<[email protected]>
	<1F2A8D3FBCC3447391A3520631ACBD25@maumau>
	<[email protected]>
	<D40AEDF3497A484BBCC1DEB79CD5CB3E@maumau>

On 2014-04-14 13:54, MauMau wrote:
> From: "Thomas Hallgren" <thomas at tada.se>
>> 3. For a test like yours, the time it takes to execute the actual 
>> statement is important. The execution may be so slow that the 
>> overhead imposed by the network call becomes negligible. A test using 
>> a lightweight "SELECT 1" instead of the heavier "UPDATE testtable" 
>> would reveal such issues.
>
>
> But I wonder why in-process execution didn't make a big difference.

But that's my point. It may well make a big difference but you don't see 
it because your tests are using an update statement. The update will do 
index lookups and physical writes to disk! This means that the update 
consumes perhaps 90% or more of the overall time, regardless of what 
calling mechanism you use. Its not a good choice if you want to measure 
calling mechanism differences.

- thomas



view thread (7+ messages)

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: <[email protected]>

* 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