-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension Attributes Join Directive is not optimized for MySQL left join #22162
Comments
Hi @swnsma. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @swnsma do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
…or MySQL left join. Create aliases based on table and join conditions instead of extension attribute name.
…or MySQL left join. Fix integration tests and provide test case coverage.
Double checked: |
Summary (*)
When you use multiple extension attributes from the same table,
left join
will be generated for each case.Issue has been faced during 'In Store Pickup' feature implementation in PR: magento/inventory#2125.
Examples (*)
db_schema.xml
And
db_schema_whitelist.json
extension_attributes.xml
OrderRepository
(see magento/magento2#8035: Join extension attributes are not added to Order results (REST api) #21797)left joins
of the same table with the same conditions instead of single one. This will cause performance degradation with every added extension attribute.Proposed solution
Create table aliases base on table name to be joined and join conditions in
\Magento\Framework\Api\ExtensionAttribute\JoinProcessorHelper::getReferenceTableAlias
The text was updated successfully, but these errors were encountered: