Index: multistep.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/multistep/multistep.install,v
retrieving revision 1.1.2.1.2.10
diff -u -p -r1.1.2.1.2.10 multistep.install
--- multistep.install	8 Sep 2009 13:30:40 -0000	1.1.2.1.2.10
+++ multistep.install	19 Jun 2010 16:02:08 -0000
@@ -24,6 +24,11 @@ function multistep_schema() {
       'status' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => '', 'description' => 'The status of the step.'),
     ),
     'description' => t('Keeps track of submitted steps in multistep forms.'),
+    'primary key' => array('nid', 'step'),
+    'indexes' => array(
+      'multistep_nid_step' => array('nid', 'step'),
+      'multistep_status' => array(array('status', 1)),
+    ),
   );
   return $schema;
 }
@@ -111,3 +116,12 @@ function multistep_update_6102() {
   // Set multistep to a higher weight so that it allows extra CCK options to load first.
   db_query("UPDATE {system} SET weight = 10 WHERE name = 'multistep'");
 }
+
+function multistep_update_6103() {
+  // Add indexes for faster querying.
+  $ret = array();
+  db_add_primary_key($ret, 'multistep', array('nid', 'step'));
+  db_add_index($ret, 'multistep', 'multistep_nid_step', array('nid', 'step'));
+  db_add_index($ret, 'multistep', 'multistep_status', array(array('status', 1)));
+  return $ret;
+}

