diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php
index 83ba531..508d8f6 100644
--- a/src/wp-admin/includes/schema.php
+++ b/src/wp-admin/includes/schema.php
@@ -118,7 +118,8 @@ CREATE TABLE $wpdb->comments (
   KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
   KEY comment_date_gmt (comment_date_gmt),
   KEY comment_parent (comment_parent),
-  KEY comment_author_email (comment_author_email(10))
+  KEY comment_author_email (comment_author_email(10)),
+  KEY comment_type (comment_type)
 ) $charset_collate;
 CREATE TABLE $wpdb->links (
   link_id bigint(20) unsigned NOT NULL auto_increment,
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index 807673a..0b0b5fb 100644
--- a/src/wp-admin/includes/upgrade.php
+++ b/src/wp-admin/includes/upgrade.php
@@ -2855,6 +2855,12 @@ function pre_schema_upgrade() {
 			maybe_convert_table_to_utf8mb4( $wpdb->termmeta );
 		}
 	}
+
+	// Upgrade versions prior to 4.7
+	if ( $wp_current_db_version < 37966 ) {
+		// Add index to wp_comments comment_type field
+		$wpdb->query( "ALTER TABLE {$wpdb->comments} DROP INDEX comment_type, ADD INDEX comment_type (comment_type)" );
+	}
 }
 
 /**
