Missing index on signups table — at Version 9
|Reported by:||barry||Owned by:|
|Component:||Database||Keywords:||has-patch commit needs-refresh 3.6-early|
Description (last modified by nacin)
wp-includes/ms-functions.php:590: $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email) ); wp-includes/ms-functions.php:595: $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE user_email = %s", $user_email) );
But there is no index on user_email in the signups table. Makes these queries perform a full table scan which is slow when you have lots of signups.
Attached patch adds the index but I can't figure out how schema upgrades on MS-specific tables ever get run after the initial activation of MS mode and table creation.
Change History (11)
- Summary changed from Missing index on wp_signups to Missing index on signups table
- Keywords 3.2-early commit added
- Milestone changed from Awaiting Review to Future Release
6 years ago
- Keywords 3.2-early removed
- Milestone changed from Future Release to 3.3