List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 29 1999 10:36pm
Subject:blobs and concat
View as plain text  
>>>>> "Jason" == Jason S Gandhi <jsg645@stripped> writes:

Jason> hello, 
Jason> i have a question about blobs and concat. 

Jason> I have a simple table, 

Jason> test_table
Jason> ---------
Jason> int       machid
Jason> log_info  blob


Jason> I have a C program that reads from stdin and writes that information to
Jason> log_info.  So everytime I read a line of data from stdin, the C program
Jason> does a 

Jason> update test_table set log_info=concat(loginfo, 'data read in from stdin')
Jason> where machid=NIPS;

Jason> I have this program running on 20 machines and mysqld is using all of my
Jason> cpu usage and is running slow(accessing other unrelated tables takes
Jason> forever). I'm sending only 100 bytes/second per machine to mysqld.

Jason> My questions are
Jason> 1. can mysql handle this amount of data being streamed into it(im pretty
Jason> sure it can, its not that much data at all)

Jason> 2. is concat slowing it down.

Jason> 3. would it be more efficient to send a larger amount of data on the
Jason> update.(instead of sending a line, send 4096 bytes)

Jason> thanks in advance

Jason> jason

Hi!

You should not CONCAT blobs in the above manner, but instead add the
information to different rows.  For every insert, the blob will be more 
and more fragmented on disk (as it has to be extended) and this will
slow things a lot!

Regards,
Monty
Thread
blobs and concatJason S Gandhi30 Jun
  • blobs and concatMichael Widenius30 Jun
Re: blobs and concatTroy Grady30 Jun
  • Re: blobs and concatMichael Widenius30 Jun