I've got script that is creating same data in database. It looks like:
START TRANSACTION;
INSERT INTO table (data);
INSERT INTO table (data);
INSERT INTO table (data);
...
COMMIT;
The script run for about 30 minutes. But when it's working, the table is locked for other INSERTS. I'm not able to INSERT any row from in another process until the script ends. Is it necessary? I'd like to use transaction, but I can't lock whole table. Is there any way to do that?