pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabios@logi-track.com>
To: Thomas Hallgren <thhal@mailblocks.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Cc: Filip Hrbek <filip.hrbek@plz.comstar.cz>
Subject: Re: PLJava and Database Meta Data
Date: Fri, 11 Feb 2005 13:54:50 +0100
Message-ID: <420CAB1A.10908@logi-track.com> (raw)
In-Reply-To: <thhal-0lzjoAoNMxiceVLzfQR5Wq+0/NL/omO@mailblocks.com>
References: <420B87A7.6080407@mailblocks.com>
	<thhal-0OSDnAts/xicKOdXFhNL1b7jI6Hr/Fb@mailblocks.com>
	<420C8477.7060604@logi-track.com>
	<420C8647.2010506@mailblocks.com>
	<thhal-0yh7oAkFMxiclCh2yth1Ot4ZOLBGAUf@mailblocks.com>
	<420C8F16.9040708@logi-track.com>
	<420C9333.9040208@mailblocks.com>
	<thhal-0tSvoAltMxicJ2/PXRMLL16HFetPb4k@mailblocks.com>
	<420C982D.9050401@logi-track.com>
	<420CA013.8070009@mailblocks.com>
	<thhal-0lzjoAoFMxicX3NiOUR7LneqpK4swBh@mailblocks.com>
	<thhal-0lzjoAoNMxiceVLzfQR5Wq+0/NL/omO@mailblocks.com>

Hi, Thomas,

Thomas Hallgren schrieb:

>> For complex datatypes, if you use the internal representation for your
>> java mapping, you have to parse bytes, 32-bit integers, doubles and such
>> from the in-memory representation.
>>
> We never parse any bytes. The internal representation of a double in the
> backend is, a double. The SPI layer communicates values in terms of
> datums that holds C-language char, short, int, long, float, double, etc.
> values and JNI treats them as their native Java correspondance in the
> Java layer.  The same is true for the actuall call handler used for SQL
> function calls into Java.

Okay, so this is fine for primitive types. How does SPI deal with
complex types?

>> Alternatively, you can use the canonical representations
>> (using the types INPUT/OUTPUT/SEND/RECEIVE functions), but this incurs
>> additional overhead.
>>
> Do you have any concrete measurments where this overhead is significant?
> In my experience, using input/output/send/receive incurs a very low
> overhead. I doubt that it's even measurable.

Yes, I have. Especially for large geometries. In our database, we have
geometry objects up to 20MB per piece. Also, in PostGIS, send/receive
binary representation differs slightly from internal representation (and
input/output text is even more overhead).

>> Is there any documentation about such PLJava internals?
>> 
> The source code :-)
> Seriosly, if you want to know PLJava internals, it's not that bad to
> look at. It's fairly well commented.

Okay, I'll do so.

Markus

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com



view thread (15+ messages)  latest in thread

Message-ID: <420CAB1A.10908@logi-track.com>
Permalink:  ../420CAB1A.10908@logi-track.com/
Also on:    postgresql.org/message-id/420CAB1A.10908@logi-track.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: schabios@logi-track.com, thhal@mailblocks.com, filip.hrbek@plz.comstar.cz
  Subject: Re: PLJava and Database Meta Data
  In-Reply-To: <420CAB1A.10908@logi-track.com>
  References: <420B87A7.6080407@mailblocks.com> <thhal-0OSDnAts/xicKOdXFhNL1b7jI6Hr/Fb@mailblocks.com> <420C8477.7060604@logi-track.com> <420C8647.2010506@mailblocks.com> <thhal-0yh7oAkFMxiclCh2yth1Ot4ZOLBGAUf@mailblocks.com> <420C8F16.9040708@logi-track.com> <420C9333.9040208@mailblocks.com> <thhal-0tSvoAltMxicJ2/PXRMLL16HFetPb4k@mailblocks.com> <420C982D.9050401@logi-track.com> <420CA013.8070009@mailblocks.com> <thhal-0lzjoAoFMxicX3NiOUR7LneqpK4swBh@mailblocks.com> <thhal-0lzjoAoNMxiceVLzfQR5Wq+0/NL/omO@mailblocks.com> <420CAB1A.10908@logi-track.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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