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:
commit
907fcdb863
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue