X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/0fead21379e269891cb6c5d0470e03f0b6fc747e..81826b3d893d2049be87e8a5445394cb50029d26:/db/dbopt.sql

diff --git a/db/dbopt.sql b/db/dbopt.sql
index 569e9ca1..1a18065a 100644
--- a/db/dbopt.sql
+++ b/db/dbopt.sql
@@ -5,6 +5,7 @@ create index i_usr_last on  users (last, first);
 create index i_usr_uid on  users (unix_uid);
 create index i_usr_pop on  users (pop_id);
 create index i_usr_clearid on users (clearid);
+create index i_usr_resv on users (reservations);
 
 create unique index i_krb_usid on krbmap  (users_id);
 create index i_krb_str on  krbmap (string_id);
@@ -15,6 +16,8 @@ create index i_mac_addr on machine (address);
 create index i_mac_loc on machine (location);
 create index i_mac_snet on machine (snet_id);
 create index i_mac_hwaddr on machine (hwaddr);
+create index i_mac_owner on machine (owner_id);
+create index i_mac_acctnumber on machine(account_number);
 
 create unique index i_hal_name on hostalias  (name);
 create index i_hal_id on hostalias (mach_id);
@@ -41,13 +44,15 @@ create index i_lis_name on  list (name);
 create index i_lis_mail on  list (maillist);
 create index i_lis_group on  list (grouplist);
 create index i_lis_gid on  list (gid);
+create index i_lis_nfsgroup on list (nfsgroup);
 create index i_lis_acl on list (acl_id);
+create index i_lis_memacl on list (memacl_id);
 
 create index i_imem_mid on imembers (member_id, member_type);
 create index i_imem_list on  imembers (list_id);
 
 create unique index i_str_sid on strings  (string_id);
-create index i_str_name on  strings (string);
+create unique index i_str_name on  strings (string);
 
 create unique index i_nfs_nid on nfsphys  (nfsphys_id);
 create index i_nfs_mach on  nfsphys (mach_id);
@@ -70,6 +75,8 @@ create unique index i_zph_class on zephyr  (class);
 
 create unique index i_hac_mid on hostaccess  (mach_id);
 
+create index i_acl_mt on acl (mach_id, target);
+
 create index i_prn_name on printers (name);
 create index i_prn_dname on printers (duplexname);
 create index i_prn_mach on printers (mach_id);
@@ -78,3 +85,13 @@ create index i_prn_loc on printers (location);
 create index i_prn_con on printers (contact);
 
 create index i_cap_tag on capacls (tag);
+
+create index i_usersids_usid on usersids (users_id);
+
+create index i_listsids_lid on listsids (list_id);
+
+create unique index i_containers_cntid on containers (cnt_id);
+create unique index i_containers_cname on containers (cname);
+
+create unique index i_mcntmap_machid on mcntmap (mach_id);
+create index i_mcntmap_cntid on mcntmap (cnt_id);
