Index: comment_upload.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_upload/comment_upload.install,v
retrieving revision 1.3.2.5
diff -u -p -r1.3.2.5 comment_upload.install
--- comment_upload.install	6 Feb 2007 11:38:19 -0000	1.3.2.5
+++ comment_upload.install	30 Apr 2008 21:43:01 -0000
@@ -15,7 +15,8 @@ function comment_upload_install() {
            description varchar(255) NOT NULL default '',
            list tinyint(1) unsigned NOT NULL default 0,
            PRIMARY KEY (fid),
-           KEY (nid)
+           INDEX (nid),
+           INDEX cid_fid (cid, fid)
         ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
       break;
     case 'pgsql':
@@ -96,4 +97,14 @@ function comment_upload_update_3() {
     break;
   }
   return $ret;
+}
+
+function comment_upload_update_4() {
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      $ret[] = update_sql("ALTER TABLE {comment_upload_files} ADD INDEX cid_fid (cid, fid)");
+    break;
+  }
+  return $ret;
 }
\ No newline at end of file
