Skip site navigation (1) Skip section navigation (2)

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

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, pgsql(at)mohawksoft(dot)com
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Date: 2004-07-27 11:43:58
Message-ID: 41063FFE.8030400@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
Thomas Hallgren wrote:

> Well, the java.nio obviously :-)
> 
> java.nio provides a java.nio.CharBuffer. A java.lang.StringBuffer is 
> synchronized. The CharBuffer is not. Since the JDBC driver uses strings 
> in a lot of places some code could be rewritten to increase performance.

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?

> And I think that Mark (pgsql(at)mohawksoft(dot)com) has a point. 90% of all 
> installations would get a performance boost if native byte order was 
> used.

Well, not mine :) (x86 clients, sparc server, and the driver doesn't yet 
use binary format in places where byte order matters anyway)

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.

-O

In response to

Responses

pgsql-hackers by date

Next:From: Thomas HallgrenDate: 2004-07-27 12:58:36
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Previous:From: Jeroen T. VermeulenDate: 2004-07-27 11:30:04
Subject: Re: Binary Cursors, and the COPY command

pgsql-jdbc by date

Next:From: Thomas HallgrenDate: 2004-07-27 12:58:36
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Previous:From: Jeroen T. VermeulenDate: 2004-07-27 11:30:04
Subject: Re: Binary Cursors, and the COPY command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group