mysql - Doctrine query optimizations -


i have created query using doctrine query builder inserts 65000 rows(including 3 tables) 3 different tables @ time when performed.and complete process finish takes 2-3 mins execute . have done persist records in loops , flush finally. there ways minimize execution time , inserts data within seconds.

no, unfortunately doctrine doesn't support grouping inserts single statement. if need bulk inserts, 1 possibility doing $em->flush() , $em->clear() after every 100th or row, see manual's recommendation:

https://doctrine-orm.readthedocs.org/en/latest/reference/batch-processing.html


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -