Why doctrine does so many sql queries ? #6013

Open
opened 2026-01-22 15:24:45 +01:00 by admin · 0 comments
Owner

Originally created by @niklass08 on GitHub (Jul 6, 2018).

Originally assigned to: @ostrolucky on GitHub.

Why doctrine does so many sql queries ?

Hello guys,

I'm new to doctrine and i'm working on an existing project that uses it. Im facing a performance issue : after fetching an entity from the database and doing some process on it's field I want to save it back. To do so I'm using the flush method. The issue is that in order to save the modification in the database doctrine does 4000+ queries including 3000+ delete and UPDATE to change the updated_at column on field that i didn't even modified. These 4000+ queries are taking up +3.5 sec. do you guys have any clue why doctrine does so much queries and why it is so long ?

Thank in advance for your answers !

Originally created by @niklass08 on GitHub (Jul 6, 2018). Originally assigned to: @ostrolucky on GitHub. Why doctrine does so many sql queries ? Hello guys, I'm new to doctrine and i'm working on an existing project that uses it. Im facing a performance issue : after fetching an entity from the database and doing some process on it's field I want to save it back. To do so I'm using the flush method. The issue is that in order to save the modification in the database doctrine does 4000+ queries including 3000+ delete and UPDATE to change the updated_at column on field that i didn't even modified. These 4000+ queries are taking up +3.5 sec. do you guys have any clue why doctrine does so much queries and why it is so long ? Thank in advance for your answers !
admin added the Invalid label 2026-01-22 15:24:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6013