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
Post a Comment