From 716958625410ff83a3ae4ff46bb74b2eebcf41a5 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 15 Aug 2019 07:13:55 +0000 Subject: [PATCH] Schema: Add an index to `wp_options.autoload`. Most sites will be unaffected by this change, but those with a large number of rows in `wp_options`, only a small number of which have `autoload` set, will see a significant performance improvement. Sites with a large number of rows in `wp_options`, with many of them having `autoload` set will unfortunately see a performance penalty on top of the already very slow queries they're running, but this should be the minority of cases. Props DanBUK. Fixes #24044. Built from https://develop.svn.wordpress.org/trunk@45805 git-svn-id: http://core.svn.wordpress.org/trunk@45616 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 3 ++- wp-includes/version.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 1511f27f39..92fd6d6619 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -144,7 +144,8 @@ CREATE TABLE $wpdb->options ( option_value longtext NOT NULL, autoload varchar(20) NOT NULL default 'yes', PRIMARY KEY (option_id), - UNIQUE KEY option_name (option_name) + UNIQUE KEY option_name (option_name), + KEY autoload (autoload) ) $charset_collate; CREATE TABLE $wpdb->postmeta ( meta_id bigint(20) unsigned NOT NULL auto_increment, diff --git a/wp-includes/version.php b/wp-includes/version.php index 8db2b4a6c9..a1d98c3663 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,14 +13,14 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45804'; +$wp_version = '5.3-alpha-45805'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 45744; +$wp_db_version = 45805; /** * Holds the TinyMCE version