Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A0A491337B80 for ; Fri, 1 Apr 2011 15:44:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51241-02 for ; Fri, 1 Apr 2011 18:44:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 291571337B97 for ; Fri, 1 Apr 2011 15:44:32 -0300 (ADT) Received: by pxi15 with SMTP id 15so973259pxi.33 for ; Fri, 01 Apr 2011 11:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=HUIqZjnkW74XTvOKTWdQYB5MQx6zQQZOX9LmP/EUkK0=; b=PfMF0gGeLK/OGENBXN5X5ZZ1C0Dl8x9f3zVeTBdbWMCu3l389OMzdjObk5GPLlSyrr z+yjCE7MvBzD7qO09g+E0Uqh95+KR7WfxDLKg3xtmE9Hn/yUfYDkt0RKxQ77IGxwjA25 5T9dMRmWscxj6Ij1IBzzZQq6K989m46M0gwqs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ndablOAxTwgjRdLMvE1ZlP1gs19nZbNAVs1jelDuXZ+eVAC6dNSeRQo8mrq/XdwFo2 mzdZPQl3AxJKyxnx0Y+piSGAvY+V0hlzM8H6uN9UF5S6t+/HehxITwQGu9yLu7yJ77AB vOkJQj0eMkyz0JZo2zDYO7/i51Qz5oABgvlgM= MIME-Version: 1.0 Received: by 10.142.155.5 with SMTP id c5mr3257801wfe.139.1301683472177; Fri, 01 Apr 2011 11:44:32 -0700 (PDT) Received: by 10.142.70.2 with HTTP; Fri, 1 Apr 2011 11:44:32 -0700 (PDT) Date: Fri, 1 Apr 2011 11:44:32 -0700 Message-ID: Subject: JDBC4 Binary Mode with Arrays From: bubba postgres To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd15512f81a69049fdfcc64 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201104/8 X-Sequence-Number: 21734 --000e0cd15512f81a69049fdfcc64 Content-Type: text/plain; charset=ISO-8859-1 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 --000e0cd15512f81a69049fdfcc64 Content-Type: text/html; charset=ISO-8859-1 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

--000e0cd15512f81a69049fdfcc64--