Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #33885, comment 106


Ignore:
Timestamp:
05/02/2022 01:06:10 PM (2 years ago)
Author:
OllieJones
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33885, comment 106

    initial v1  
    88
    99Why? Please see my earlier response to this tix at https://core.trac.wordpress.org/ticket/33885#comment:86
     10
     11If you don't want to add yet another plugin to your site, and you're on a recent MySQL version, try using this SQL statement to add the more efficient indexes you need. (But the plugin automatically deals with older MySQL versions as best it can.)
     12
     13
     14
     15{{{
     16ALTER TABLE wp_postmeta
     17    ADD UNIQUE KEY meta_id (meta_id),
     18    DROP PRIMARY KEY,
     19    ADD PRIMARY KEY (post_id, meta_key, meta_id),
     20    DROP KEY meta_key,
     21    ADD KEY meta_key (meta_key, meta_value(32), post_id, meta_id),
     22    ADD KEY meta_value (meta_value(32), meta_id),
     23    DROP KEY post_id;
     24}}}