mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Why doctrine does so many sql queries ? #6014
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 !
@Ocramius commented on GitHub (Jul 6, 2018):
Sorry, on the road, so I can't browse for proper links, but you may need to:
https://ocramius.github.io/blog/doctrine-orm-optimization-hydration/
On Fri, 6 Jul 2018, 12:31 Nicolas BABEL, notifications@github.com wrote:
@ostrolucky commented on GitHub (Aug 2, 2018):
Unfortunately I have to close this, as this is not a support forum and this is not an actual issue. Try to use some of our community channels.