I have a batch of data that needs to be added to a mysql database every day consisting of about 100K queries.
START TRANSACTION;
INSERT IGNORE INTO info (Created, Modified, MType, Pform, Name, Version, Sig) VALUES ('2013-07-31','2013-07-31','mtype','pform','name','version','signature');
(repeat 49,000 times)
edit: SELECT id INTO @r FROM info WHERE sig = 'signature';
INSERT IGNORE INTO fullname (ID, Name) values (@r,'fullname');
(repeat 49,000 times)
UPDATE info SET dbversion = 2098 WHERE dbversion = 0;
UPDATE version SET ver = 2098;
COMMIT;
I feel like this is not the most efficient way to do this. The process doesn't use much CPU or memory but I'd like it to complete more quickly if possible. It takes ~20 minutes right now. Any advice?