Skip to content

Commit

Permalink
Issue #289504 by catch, mikeryan, moshe weitzman: Fixed user_delete()…
Browse files Browse the repository at this point in the history
… performance: index comment uid columns.
  • Loading branch information
webchick committed Feb 1, 2012
1 parent d0dc85e commit df99795
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/comment/comment.install
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ function comment_update_7001() {
function comment_update_7002() {
db_rename_table('comments', 'comment');

// Add user-related indexes.
db_add_index('comment', 'comment_uid', array('uid'));
db_add_index('node_comment_statistics', 'last_comment_uid', array('last_comment_uid'));
// Add user-related indexes. These may already exist from Drupal 6.
if (!db_index_exists('comment', 'comment_uid')) {
db_add_index('comment', 'comment_uid', array('uid'));
db_add_index('node_comment_statistics', 'last_comment_uid', array('last_comment_uid'));
}

// Create a language column.
db_add_field('comment', 'language', array(
Expand Down

0 comments on commit df99795

Please sign in to comment.