Re: Storing large BLOBs
Posted by: Mark Matthews
Date: February 01, 2005 08:25AM

Jay Key wrote:
> I'm trying to load large blobs using the
> Connector/J drivers, and can't seem to find a
> combination of code that does the trick. It seems
> that the PreparedStatement.setBinaryStream()
> method actually attempts to allocate a byte array
> for the ENTIRE amount of data being stored. Is
> there any workaround to not have to read the whole
> file into memory?

Jay,

You have to use Connector/J 3.1.6 and MySQL-4.1 to not allocate the entire blob. Prior to MySQL-4.1, there was no way to send a blob in 'pieces' to the server, the protocol actually required the entire blob be sent all at once.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
February 01, 2005 06:32AM
Re: Storing large BLOBs
February 01, 2005 08:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.