| 10 | |
| 11 | If 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 | {{{ |
| 16 | ALTER 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 | }}} |