Merge pull request woocommerce/woocommerce-admin#1435 from woocommerce/fix/1372

Added indices for faster joins with customer table and filtering by order status.
This commit is contained in:
Peter Fabian 2019-02-01 10:27:06 +01:00 committed by GitHub
commit 907fcdb863
1 changed files with 3 additions and 1 deletions

View File

@ -720,7 +720,9 @@ class WC_Admin_Api_Init {
status varchar(200) NOT NULL, status varchar(200) NOT NULL,
customer_id BIGINT UNSIGNED NOT NULL, customer_id BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (order_id), PRIMARY KEY (order_id),
KEY date_created (date_created) KEY date_created (date_created),
KEY customer_id (customer_id),
KEY status (status)
) $collate; ) $collate;
CREATE TABLE {$wpdb->prefix}wc_order_product_lookup ( CREATE TABLE {$wpdb->prefix}wc_order_product_lookup (
order_item_id BIGINT UNSIGNED NOT NULL, order_item_id BIGINT UNSIGNED NOT NULL,