Make WordPress Core


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.

File:
1 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 (
Note: See TracChangeset for help on using the changeset viewer.