diff --git workflow.install workflow.install
index 331c6c9..0001def 100644
--- workflow.install
+++ workflow.install
@@ -421,4 +421,13 @@ function workflow_update_6101() {
     db_change_field($ret, 'workflow_transitions', 'tid', 'tid', array('type' => 'serial', 'not null' => TRUE), array('primary key' => array('tid')));
   }
   return $ret;
-}
\ No newline at end of file
+}
+
+/**
+ * Add index for workflow_stats.
+ */
+function workflow_update_6102() {
+  $ret = array();
+  db_add_index($ret, 'workflow_states', 'weight', array('wid', 'sid', 'weight'));
+  return $ret;
+}
