[wp-hackers] 2.0.4 Performance Issues
Brian Layman
Brian at TheCodeCave.com
Sun Aug 6 20:44:01 GMT 2006
>Already there.
Actually, this is somewhat revealing...
I just created another site from the 2.04 install and it only has the
PRIMARY and post_name indices/indexes in that DB too.
According to upgrade-schema.php, you are only suppose to have KEY and
post_name:
CREATE TABLE $wpdb->posts (
[A BUNCH OF FIELDS]
PRIMARY KEY (ID),
KEY post_name (post_name)
);
However, in upgrade-functions.php, the 'post_status' index is added as
part of function upgrade_101().
// Clean up indices, add a few
add_clean_index($wpdb->posts, 'post_name');
add_clean_index($wpdb->posts, 'post_status');
add_clean_index($wpdb->categories, 'category_nicename');
add_clean_index($wpdb->comments, 'comment_approved');
add_clean_index($wpdb->comments, 'comment_post_ID');
add_clean_index($wpdb->links , 'link_category');
add_clean_index($wpdb->links , 'link_visible');
It seems upgrade_101 is not called when a new DB is create because the
version is already 3440.
All of those other indices have been moved over to the schema file but
post_status has not. Now in my wife's blog, her db has a number of
others, but I don't know how many of these are thanks to plugins...
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 749 ID
post_date INDEX 749 post_date
post_date_gmt INDEX 749 post_date_gmt
post_name INDEX 749 post_name
post_status INDEX 4 post_status
autometa FULLTEXT 749 post_content
post_title
It makes me wonder if people who have followed the upgrade paths have
any other indices/indexes that a person who straight installed a version
does not have....
More information about the wp-hackers
mailing list