Re: [HACKERS] Binary Cursors, and the COPY command

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Date: 2004-07-27 12:58:36
Message-ID: thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

Oliver Jowett wrote:

> I haven't seen the string manipulation to be much of a problem with
> the current driver in the profiling I've done (it'll be quite
> application specific though). And I'd have thought the stringbuffer
> monitors would be essentially uncontended and cheap to enter. What are
> the hotspots you see?
>
See below...

> Also I am fairly suspicious about claims that native byte order will
> make things go measurably faster. Do you have any profiling or
> benchmarks to back that up? The low-level manipulation of protocol
> data barely shows up on the profiles I've done.

I haven't made any benchmarks and I admit that as long as the client and
server runs in separate processes, the gain will be relatively small.
Context switching and socket management are the real time consumers.

I'm the author of PL/Java. It uses its own JDBC driver on top of SPI.
The main reason for thas is that I don't want the overhead of streaming
data and flipping byte order when everything is readily available in
memory. When "client" and "server" resides in the same process the
overhead is measurable. By using java.nio in your JDBC, I beleive it
would be possible to not just use native byte ordering, but perhaps also
to create a nice abstraction allowing direct access to structures in
memory rather than streaming data, thus obliviate the need for my own
driver. And PL/Java will never run on Java 1.3 or older :-)

Do you have any opinion on that?

Regards,

Thomas Hallgren

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-27 13:11:55 Savepoints inside functions
Previous Message Oliver Jowett 2004-07-27 11:43:58 Re: [HACKERS] Binary Cursors, and the COPY command

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-07-27 22:19:03 Re: [HACKERS] Binary Cursors, and the COPY command
Previous Message Oliver Jowett 2004-07-27 11:43:58 Re: [HACKERS] Binary Cursors, and the COPY command