Glad to hear this. I was already going that way with my site because I
didn't want to have to either drop and reload the database or take ther
mysql server down to run the cleanup utility. W/o blobs/text you can use
fixed length fields which means the database doesn't become fragmented.
On Fri, 21 Sep 2001, Mark Matthews wrote:
> Date: Fri, 21 Sep 2001 08:14:45 -0500
> From: Mark Matthews <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Faliue: Write huge binary data to blob Field of mysql use jdbc
>
> Hi, I'm the author of the JDBC driver. I'm not sure what the problem is, but
> I am going to try and talk you out of storing multi-megabytes as blobs.
> Here's why....In most cases it is more overhead than it is worth. If you're
> going to be serving the data from these blobs from some other type of server
> (HTTP/NFS, etc), then you've more than doubled your overhead with the
> over-the-wire costs. RDBMS systems are not optimized for storing and
> retrieving large binary data, filesystems are.
>
> What you probably want to do is generate some unique identifier for the file
> and store it on a filesystem that the software you are writing has access
> to. Use MySQL to store metadata about these files (their identifier, author,
> revision history, etc), and then use standard ways of providing the file
> (http/nfs/smb, etc). You will find this much more performant.
>
> If you still want to store large files in BLOBs, I would look at increasing
> your JVM heap size (by default it's around 16megs, the VM won't allocate
> more memory than that), using the -Xmx switch (see your JDK documentation).
> Because of the way the MySQL protocol works, the entire BLOB must be created
> in memory as a single packet to be sent to the server, so the driver needs
> at least the amount of memory as the size of your BLOB, plus some overhead
> for escaping binary characters, plus overhead for the driver itself.
>
>
>
> -Mark
>
> > > We are making a project about "document manage " ,I use
>
> > > org.gjt.mm.mysql
>
> > > as jdbc to communicate with mysql. I can succeed in writing
>
> > > the binary data
>
> > > (the size about 14M) to database ,but when I write the binary
>
> > > data that's
>
> > > size exceed 20M I get a Exception. Please help me! Thanks!
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
Sincerely,
William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php