If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL CPU Load

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-09-03, 15:28
DrSmartman DrSmartman is offline
Registered User
 
Join Date: Aug 2003
Location: Reston, VA
Posts: 59
MySQL CPU Load

Hello Everyone,

I'm running a Perl Script to convert a number of deprecated database tables into my new schema. I wrote a specific script for it because the table designs were so different, many rules needed to be applied and I needed to perform multiple INSERTs...thus, I did not use 'mysqldump/mysqlimport', 'mysqlhotcopy' or 'LOAD DATA INFILE'.

Anyway, my program essentially reads the contents of a file....each record is queried against the NEW database to check for existance...if it doesn't exist, add it. Otherwise, go to the next record.

The program logic works fine...however, with the loop causing a number of repetitive queries, MySQL is sucking up a ton of resources on my box (i.e. 95% CPU). Should I worry about MySQL crashing the box or are there any safeguards built in? Or, does MySQL simply take ALL the resources it has available to it.

I'm guessing the program generates up to 100 queries per second....(no I haven't benchmarked...just a guess).

Is it common to write prorams that are so DB intensive....????

Just looking for your thoughts.....

Thanks!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On