Why does TRANSACTION / COMMIT improve performance so much with PHP/MySQL (InnoDB)?
问题 I've been working with importing large CSV files of data; usually less than 100,000 records. I'm working with PHP and MySQL (InnoDB tables). I needed to use PHP to transform some fields and do some text processing prior to the MySQL INSERT s (part of process_note_data() in code below). MySQL's LOAD DATA was not feasible, so please do not suggest it. I recently tried to improve the speed of this process by using MySQL transactions using START TRANSACTION and COMMIT . The performance increase