simple sql query on wp_postmeta very slow
wp_postmeta has inefficient indexes. The published table (see Wikipedia) is CREATE TABLE wp_postmeta ( meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, post_id bigint(20) unsigned NOT NULL DEFAULT ‘0’, meta_key varchar(255) DEFAULT NULL, meta_value longtext, PRIMARY KEY (meta_id), KEY post_id (post_id), KEY meta_key (meta_key) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; The problems: The AUTO_INCREMENT provides no benefit; in fact … Read more