Make WordPress Core

Changeset 45805


Ignore:
Timestamp:
08/15/2019 07:12:04 AM (5 years ago)
Author:
pento
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r45788 r45805  
    145145    autoload varchar(20) NOT NULL default 'yes',
    146146    PRIMARY KEY  (option_id),
    147     UNIQUE KEY option_name (option_name)
     147    UNIQUE KEY option_name (option_name),
     148    KEY autoload (autoload)
    148149) $charset_collate;
    149150CREATE TABLE $wpdb->postmeta (
  • trunk/src/wp-includes/version.php

    r45757 r45805  
    2121 * @global int $wp_db_version
    2222 */
    23 $wp_db_version = 45744;
     23$wp_db_version = 45805;
    2424
    2525/**
Note: See TracChangeset for help on using the changeset viewer.