Lists: | pgsql-jdbc |
---|
From: | Warren Little <wlittle(at)securitylending(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | jdbc and large binary files |
Date: | 2004-08-28 23:23:11 |
Message-ID: | 1093735390.2866.6.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-jdbc |
Hello,
I'm currently using the LO api with the oid data type for storing
large objects. I would like to switch to bytea data. When I last
tested this idea (over 8 months ago) I experienced massive memory bloat
in the JDBC application. I recall seeing some threads on fixing this
problem. Can anyone tell me if this issue has been addressed in the
latest driver?
thanks
--
Warren Little
Senior Vice President
Secondary Markets and IT Manager
Security Lending Wholesale, LC
www.securitylending.com
Tel: 866-369-7763
Fax: 866-849-8079
From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Warren Little <wlittle(at)securitylending(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: jdbc and large binary files |
Date: | 2004-08-28 23:53:03 |
Message-ID: | 41311ADF.9060207@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-jdbc |
Warren Little wrote:
> Hello,
> I'm currently using the LO api with the oid data type for storing
> large objects. I would like to switch to bytea data. When I last
> tested this idea (over 8 months ago) I experienced massive memory bloat
> in the JDBC application. I recall seeing some threads on fixing this
> problem. Can anyone tell me if this issue has been addressed in the
> latest driver?
PreparedStatement.setBinaryStream() will now stream data directly to the
server with no additional heap storage needed. setBytes() takes a copy
of the bytearray it is given, but otherwise behaves like setBinaryStream().
ResultSet still stores the whole value on heap. To avoid this requires
protocol modifications.
-O