Depending on size of data there are a few different methods...   Just like
what most people do.. use plain insert statements with the data properly
escaped and shouldn't have any problem going in.

Pulling data out is pretty quick .. I can stream binary data out of my
mysql storage servers via our ftp gateway at speeds about 40MB/sec (~
4000k/sec) which is pretty quick for the crappy development server I've
got..

You mention streaming in.. I've got a ftpgateway to mysql storage that I
use.. it's written in java.. but you could also implement one in C++




On Tue, 27 May 2003, Adam Clauss wrote:

> Copied from my original message:
> I am writing a database that will contain a blob field for some binary data.
> My question is, what is the most efficient way to load this binary data in?
> I could turn it into a string and pass it into an INSERT/UPDATE statement,
> but I am afraid that problems will arise when it is converted into a string
> (with newlines, nulls, etc).  I considered saving it to a file, and then
> using LOAD_FILE, but:
> a) that ALSO invovles turning it into a string, but since MySQL is doing it,
> it might end up OK.
> b) I'm not sure how the performance will be when I have to save it to a
> file, then have MySQL read it back in.
>
> The app is using the C++ API and I was wondering if there was any other way
> to directly 'stream' the data in?
>
> Thanks,
> Adam Clauss
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Mike Hillyer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 12:31 PM
> To: Adam Clauss; [EMAIL PROTECTED]
> Subject: RE: How to fill an Blob with binary data
>
>
> In what language?
>
> Mike Hillyer
> www.vbmysql.com
>
>
> -----Original Message-----
> From: Adam Clauss [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 11:30 AM
> To: Mike Hillyer; [EMAIL PROTECTED]
> Subject: RE: How to fill an Blob with binary data
>
>
> In my case, its neither.  Some "random" binary data.  Could be ANY kind
> of
> file... (I'm doing mine programmatically).
>
> Adam Clauss
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Mike Hillyer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 12:23 PM
> To: Adam Clauss; [EMAIL PROTECTED]
> Subject: RE: How to fill an Blob with binary data
>
>
> Like I said, for Image and text blobs, use MyCC and it should work.
>
> Mike Hillyer
> www.vbmysql.com
>
>
> -----Original Message-----
> From: Adam Clauss [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: RE: How to fill an Blob with binary data
>
>
> I am in need of help with the same question (sent late last night, but
> apparently got passed over).
>
> Adam Clauss
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Thomas Hoelsken [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 12:11 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: How to fill an Blob with binary data
>
>
> Hi,
>
> isn't there any other solution instead of using PHP just for filling an
> Blob!?
>
> I don't need php and would prefer any other way!
>
> Thanks,
> Thomas
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 27, 2003 6:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: How to fill an Blob with binary data
> >
> >
> >
> > Search the mailing list archives for this... There is a link to this
> > article:
> >
> http://www.php4.com/forums/viewtopic.php?t=6
>
>
> I wonder if the mailinglist search was powered by google more people
> would
> use it?
>
> On Tue, 27 May 2003, Thomas Hoelsken wrote:
>
> > Hi,
> >
> > I would like to fill an Blob with binary data thru SQL-statements or
> > any other MySQL tools and don't know how!?
> >
> > Are there suggestions?
> >
> > Thanks,
> > Thomas Hoelsken
> >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to