-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Add date index to order tables for speeding up order list query. #39682
Conversation
Test Results SummaryCommit SHA: 9b6c7ba
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi @barryhughes, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
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.
Left a non-blocking question (it's not a request for changes, though). Looks good and tests well (key was established, order list table functions as before). Thanks!
@@ -1162,6 +1162,11 @@ private static function get_schema() { | |||
|
|||
$product_attributes_lookup_table_creation_sql = wc_get_container()->get( DataRegenerator::class )->get_table_creation_sql(); | |||
|
|||
$feature_controller = wc_get_container()->get( FeaturesController::class ); | |||
$hpos_enabled = |
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.
Not a request to change anything, more asking out of curiosity. At this stage, with HPOS on the verge of being marked stable, might we not simply create the HPOS tables as standard?
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.
Actually, that's not a bad idea. I think we can do in preparation for a larger move. Would you like to create an issue for this?
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.
Created (and added to the project board) ✅
Submission Review Guidelines:
Changes proposed in this Pull Request:
This adds the equivalent index of wp_posts'
type_status_date
, the main impact of this index would be on the order list page for large sites. Additionally, it also connects WC_Install's create table method to HPOS when it is enabled.Closes #35465
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
wp option update woocommerce_version 7.9.0
wp option get woocommerce_version
, it should be greater than 7.9.0.wp db query "show index from wp_wc_orders where Key_name like 'type_status_date'"
, it should show 3 rows for each index in query like this:Changelog entry
Significance
Type
Message
Comment