Index: messaging.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/messaging/messaging.install,v
retrieving revision 1.2.2.4.2.9
diff -u -p -r1.2.2.4.2.9 messaging.install
--- messaging.install	22 Jan 2009 18:53:39 -0000	1.2.2.4.2.9
+++ messaging.install	26 Jan 2009 20:06:27 -0000
@@ -23,6 +23,11 @@ function messaging_schema() {
       'log' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
     ),    
     'primary key' => array('mqid'),
+    'indexes' => array(
+      'cron' => array('cron'),
+      'queue' => array('queue'),
+      'log' => array('log'),
+    ),
   );
  
   /*
@@ -215,4 +220,16 @@ function messaging_update_6003() {
   $ret = array();
   db_change_field($ret, 'messaging_store', 'params', 'params', array('type' => 'text', 'not null' => TRUE, 'size' => 'big', 'serialize' => TRUE));
   return $ret;
+}
+
+/**
+ * update messaging store to add in indexes
+ */
+function messaging_update_6004() {
+  $ret = array();
+  db_add_index($ret, 'messaging_store', 'cron', array('cron'));
+  db_add_index($ret, 'messaging_store', 'queue', array('queue'));
+  db_add_index($ret, 'messaging_store', 'log', array('log'));
+  
+  return $ret;
 }
\ No newline at end of file
