From: | thomas at tada(dot)se (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? |
Date: | 2014-04-14 19:32:35 |
Message-ID: | 534C37D3.3090000@tada.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Taniguchi, Yasunori | 2014-04-30 01:59:42 | [Pljava-dev] VPDCマシンがパンク |
Previous Message | Alberto Cabello Sánchez | 2014-04-14 12:18:27 | [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process? |