Re: [pgsql-jdbc] Daily digest v1.2821 (7 messages)

From: John Lister <john(dot)lister(at)kickstone(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org, bubba(dot)postgres(at)gmail(dot)com, rsmogura(at)softperience(dot)eu
Subject: Re: [pgsql-jdbc] Daily digest v1.2821 (7 messages)
Date: 2011-04-04 21:26:23
Message-ID: 4D9A377F.9060508@kickstone.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I've also (many years ago) a binary patch specifically for arrays, I
also rewrote the text version as well to be much more efficient (at the
time there was significant speed ups). I should get around to cleaning
it up and submitting it - maybe along with the others....

One thing you can do is replace StringBuffer with StringBuilder which
doesn't do synchronisation and is faster, which is something that could
be done throughout the driver as at the time I couldn't find any shared
instances - but requires java1.5

John

On 04/04/2011 22:20, pgsql-jdbc-owner(at)postgresql(dot)org wrote:
> Mess
> Date: Sun, 3 Apr 2011 22:40:41 +0200
> From: =?utf-8?q?Rados=C5=82aw_Smogura?=<rsmogura(at)softperience(dot)eu>
> To: pgsql-jdbc(at)postgresql(dot)org
> Cc: bubba postgres<bubba(dot)postgres(at)gmail(dot)com>
> Subject: Re: JDBC4 Binary Mode with Arrays
> Message-ID:<201104032240(dot)41399(dot)rsmogura(at)softperience(dot)eu>
>
> bubba postgres<bubba(dot)postgres(at)gmail(dot)com> Friday 01 April 2011 20:44:32
>> Sorry for the cross post, I put this on general first:
>>
>> In my current application I am sending a lot of data to/from the DB with
>> JDBC, and specifically arrays of Double. (or even Double[][]).
>> I have been converting everything into a string representation of the array
>> with StringBuffer, which eats a lot of memory.
>>
>> I note that there is this web page:
>> http://wiki.postgresql.org/wiki/JDBC-BinaryTransfer
>>
>> Which made me think I might be saved.
>>
>> After trying out the JDBC4 driver in DBCP, I see that
>> Connection.createArray(...) still just creates a big string under the
>> covers. Is that the expected behavior? Am I doing it wrong?
>> Will the String get converted to binary representation again before hitting
>> the wire?
>>
>> Regards,
>> -JD
> I developed some experimental driver, with support for binary mode, and it's
> only supported mode right now. I'll be glad if You try it:
> http://softperience.eu/pages/cmn/ngpgjdbc.xhtml
>
> Regards,
> Radoslaw Smogura

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2011-04-04 22:28:05 Re: [pgsql-jdbc] Daily digest v1.2821 (7 messages)
Previous Message Radosław Smogura 2011-04-04 19:14:14 Re: JDBC gripe list