core
core copied to clipboard
perf(extension): Generate a subquery only if a where clause contains a one-to-many eager fetching
Q | A |
---|---|
Branch? | 2.6 |
Tickets | #3267 |
License | MIT |
Doc PR | api-platform/docs#... |
Accoding to this issue #944, we need to generate a subquery to fetch all wanted entries, when the "where" clause contains a one-to-many relations. But the fix to this issue is too large for me : it checks all the relations (one-to-many, many-to-one, and many-to-many) of the target entity if there are some "eager fetching". This behaviour can cause performance issues due to the subquery.
My fix is to limits the subquery generation to the cases that the joined table
- is also used in the where clause
- and it has a one-to-many eager feching.
Question: as it fixes a performance issue. If it's merged in 2.6, will it be merged in master ?
The change is too deep to be included in a patch version. As it's not a bug fix stricto sensu but a performance optimization, we'll merge it in the next minor instead.
The change is too deep to be included in a patch version. As it's not a bug fix stricto sensu but a performance optimization, we'll merge it in the next minor instead.
@dunglas It sounds great! Is there anything that I should do to make this happen ?
Hello, is there any news about this MR ? If you want to re-target the branche to 2.7, just let me know.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@soyuka @binxiaoff Hi! Any news here? That behavior causes performance issues, so it would be good to improve it. Is there something I can do to help?