Add index on SKU filed in wc_product_meta_lookup table. (#47051)

This commit is contained in:
Vedanshu Jain 2024-05-01 15:48:46 +05:30 committed by GitHub
parent b95293a99a
commit 302da40214
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: performance
Add index on SKU filed in wc_product_meta_lookup table

View File

@ -1599,7 +1599,8 @@ CREATE TABLE {$wpdb->prefix}wc_product_meta_lookup (
KEY `stock_status` (`stock_status`),
KEY `stock_quantity` (`stock_quantity`),
KEY `onsale` (`onsale`),
KEY min_max_price (`min_price`, `max_price`)
KEY min_max_price (`min_price`, `max_price`),
KEY sku (sku(50))
) $collate;
CREATE TABLE {$wpdb->prefix}wc_tax_rate_classes (
tax_rate_class_id bigint(20) unsigned NOT NULL auto_increment,