Added indices for faster joins with customer table and filtering by order status.

This commit is contained in:
Peter Fabian 2019-01-31 10:54:55 +01:00
parent e65247c54e
commit 40b9458f8d
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,
customer_id BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (order_id),
KEY date_created (date_created)
KEY date_created (date_created),
KEY customer_id (customer_id),
KEY status (status)
) $collate;
CREATE TABLE {$wpdb->prefix}wc_order_product_lookup (
order_item_id BIGINT UNSIGNED NOT NULL,