Index: userpoints.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/userpoints/userpoints.install,v
retrieving revision 1.15
diff -u -p -r1.15 userpoints.install
--- userpoints.install	26 Mar 2008 20:12:43 -0000	1.15
+++ userpoints.install	9 Nov 2010 00:01:04 -0000
@@ -48,6 +48,8 @@ function userpoints_schema() {
     'primary key' => array('pid'),
     'indexes' => array(
       'last_update' => array('last_update'),
+      'uid' => array('uid'),
+      'points' => array('points'),
     ),
   );
   
@@ -147,6 +149,9 @@ function userpoints_schema() {
       'operation' => array('operation'),
       'reference' => array('reference'),
       'status' => array('status'),
+      'uid' => array('uid'),
+      'approver_uid' => array('approver_uid'),
+      'points' => array('points'),
     )
   );
   return $schema;
@@ -230,3 +235,12 @@ function userpoints_update_8() {
   db_change_field($ret, 'userpoints', 'tid', 'tid', array('type' => 'int', 'not null' => true, 'default' => 0, 'lenght' => 11));
   return $ret;
 }
+function userpoints_update_9() {
+  $ret = array();
+  db_add_index($ret, 'userpoints', 'uid', array('uid'));
+  db_add_index($ret, 'userpoints', 'points', array('points'));
+  db_add_index($ret, 'userpoints_txn', 'uid', array('uid'));
+  db_add_index($ret, 'userpoints_txn', 'approver_uid', array('approver_uid'));
+  db_add_index($ret, 'userpoints_txn', 'points', array('points'));
+  return $ret;
+}
