From: maumau307 at gmail.com (MauMau) Date: Mon, 14 Apr 2014 20:54:51 +0900 Subject: [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? In-Reply-To: <534BAE6D.9050201@tada.se> References: <30A6B4B499494CED93770BBC4835840C@maumau> <5F50DAFCABA4426FA54E9D8D0B78B38B@maumau> <534AA39A.4010906@tada.se> <1F2A8D3FBCC3447391A3520631ACBD25@maumau> <534BAE6D.9050201@tada.se> Message-ID: From: "Thomas Hallgren" > 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. Yeah, I thought this is the most likely. We are trying to speed up batch jobs dramatically, and I hoped PL/Java's in-process architecture would contribute to that. But I wonder why in-process execution didn't make a big difference. I expected several times of difference because I saw the PollPosition benchmark results at http://hsqldb.org/. It compares HSQLDB's in-process and client-server execution models. I assume the client and the server ran on the same host. Anyway, in-process and out-of-process execution doesn't seem to make a big difference for batch jobs which issue many SQL statements. Regards MauMau