Index: comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.19
diff -u -r1.19 comment.install
--- comment.install	16 Jan 2008 21:45:30 -0000	1.19
+++ comment.install	31 Jul 2008 13:36:02 -0000
@@ -67,6 +67,16 @@
   return $ret;
 }
 
+/**
+ * Add indices to uid fields.
+ */
+function comment_update_6004() {
+  $ret = array();
+  db_add_index($ret, 'comments', 'uid', array('uid'));
+  db_add_index($ret, 'node_comment_statistics', 'last_comment_uid', array('last_comment_uid'));
+  return $ret;
+}
+
 
 /**
  * Implementation of hook_schema().
@@ -167,6 +177,7 @@
     'indexes' => array(
       'pid'    => array('pid'),
       'nid'    => array('nid'),
+      'uid'    => array('uid'),
       'status' => array('status'), // This index is probably unused
     ),
     'primary key' => array('cid'),
@@ -210,7 +221,8 @@
     ),
     'primary key' => array('nid'),
     'indexes' => array(
-      'node_comment_timestamp' => array('last_comment_timestamp')
+      'node_comment_timestamp' => array('last_comment_timestamp'),
+      'last_comment_uid' => array('last_comment_uid'),
     ),
   );
 
