-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add field to filter to collection #15097
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
Conversation
Currently the setup upgrade is looping truth all order addresses and is the checking if the quote_address_id is empty. Changed this so that the collection contains only addresses where the quote_address_id is NULL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dverkade, changed code is a one-time operation, do you have any numbers to compare before/after the change on a real store?
Just to be sure there is really some kind of bottleneck here.
Hi @orlangur, No exact numbers. But when upgrading an Magento instance the upgrade got stuck around this code (store with quite a few orders in it). So when you run the upgrade again it will process all orders which where already processed again, which is not necessary. As far as I can see the "quote_address_id" field was always present in the installation schema, so this field might already be filed with data and it's unnecessary to loop truth those records as well. And above all the code is more clear and clean. |
Hi @orlangur, Have you been able to review this? |
Hi @dverkade. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Accepted Public Pull Requests: - #16275: Simplified TypeProcessor (by @joni-jones) - #15842: [Forwardport] Add missing table aliases to fields mapping for Customer Group filter� (by @hitesh-wagento) - #15744: [Forwardport] [BUGFIX] #15564 Generated admin API token expires immediately (by @vijay-wagento) - #15726: Forwardport] Feature space between category page #1 (by @sanjay-wagento) - #15698: [Forwardport] Variant product image in sidebar wishlist block (by @dmytro-ch) - #15672: [FORWARDPORT #15097] Add field to filter to collection (by @dverkade) - #16256: #15255 unlock customer after password reset (by @vgelani) - #16246: [Forwardport] array_push(...) calls behaving as '$array[] = ...', $array[] = works faster than invoking functions in PHP (by @lfluvisotto) - #16224: [Forwardport] Correct return type of methods and typo correction. (by @saurabh-aureate) - #16225: Navigation dropdown caret icon. (by @tejash-wagento) - #15980: Use correct error message for duplicate error key in product import (by @denteblu) Fixed GitHub Issues: - #15822: SQL Error: ambiguous column 'customer_group_id' in 'All customers' page in admin when extension attribute table is joined (reported by @radio) has been fixed in #15842 by @hitesh-wagento in 2.3-develop branch Related commits: 1. 0f23ed7 - #15564: 2.2.4 Created admin token has no access (reported by @krukas) has been fixed in #15744 by @vijay-wagento in 2.3-develop branch Related commits: 1. 7f34b22 2. 349d178 - #12601: A space between the category page and the main footer when applying specific settings (reported by @wd7080) has been fixed in #15726 by @sanjay-wagento in 2.3-develop branch Related commits: 1. ce176d2 - #15255: Customer who exceeded max login failures not able to login even after reset password (reported by @tizzyguy87) has been fixed in #16256 by @vgelani in 2.3-develop branch Related commits: 1. a108233
Currently the setup upgrade is looping truth all order addresses and is the checking if the quote_address_id is empty. Changed this so that the collection contains only addresses where the quote_address_id is NULL.