DDC-53: Introduce batching of eager loads #65

Closed
opened 2026-01-22 12:25:45 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 15, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user romanb:

During hydration when an association is encountered that is configured EAGER this entity is directly loaded through a separate SQL statement. This is inefficient for single-valued associations as it leads to the n+1 queries problem. This should be improved by somehow collecting all entities that need to be eagerly fetched and loading them in a single statement or in batches.

Originally created by @doctrinebot on GitHub (Oct 15, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user romanb: During hydration when an association is encountered that is configured EAGER this entity is directly loaded through a separate SQL statement. This is inefficient for single-valued associations as it leads to the n+1 queries problem. This should be improved by somehow collecting all entities that need to be eagerly fetched and loading them in a single statement or in batches.
admin closed this issue 2026-01-22 12:25:47 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 31, 2009):

Comment created by romanb:

Update: This affects inverse sides of a one-one association since these can never be lazy as well as one-one owning sides that are configured EAGER.

Probably batching of collection loads is also somehow possible but all this needs quite some design and planning before implementation.

@doctrinebot commented on GitHub (Oct 31, 2009): Comment created by romanb: Update: This affects inverse sides of a one-one association since these can never be lazy as well as one-one owning sides that are configured EAGER. Probably batching of collection loads is also somehow possible but all this needs quite some design and planning before implementation.
Author
Owner

@doctrinebot commented on GitHub (Aug 26, 2010):

Comment created by romanb:

Rescheduled.

@doctrinebot commented on GitHub (Aug 26, 2010): Comment created by romanb: Rescheduled.
Author
Owner

@doctrinebot commented on GitHub (Mar 6, 2011):

Comment created by @beberlei:

I implemented batching of eager loads for Many-To-One and Owning One-To-One associations so far as part of DDC-952.

@doctrinebot commented on GitHub (Mar 6, 2011): Comment created by @beberlei: I implemented batching of eager loads for Many-To-One and Owning One-To-One associations so far as part of [DDC-952](http://www.doctrine-project.org/jira/browse/DDC-952).
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2011):

Comment created by @beberlei:

Implemented

@doctrinebot commented on GitHub (Mar 16, 2011): Comment created by @beberlei: Implemented
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 16, 2011): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#65