In addition to the suggestions @Wouter provided, you should check your indexes. If you are inserting 10k+ rows, you may want to disable keys prior to the insert process. Don't forget to enable keys afterward.
ref. MySql 5.5 Documentation:
This feature can be activated
explicitly for a MyISAM table. ALTER
TABLE ... DISABLE KEYS tells MySQL to
stop updating nonunique indexes. ALTER
TABLE ... ENABLE KEYS then should be
used to re-create missing indexes.
MySQL does this with a special
algorithm that is much faster than
inserting keys one by one, so
disabling keys before performing bulk
insert operations should give a
considerable speedup. Using ALTER
TABLE ... DISABLE KEYS requires the
INDEX privilege...