One thing I might suggest is to queue up your inserts, then use the extended
insert syntax to populate several records at once in a single INSERT instead
of 12 separate ones. I believe you can alter the /etc/my.cnf file to play
more 'nice' as far as priorities and memory, but I've never touched it
Ryan Marks wrote:
I have a cronjob that runs a PHP script against MySQL. The script takes 5
minutes to process 4000 records (approximately 12 records per second). Here
are the top two entries from top:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
8671 mysql 25