]> andersk Git - moira.git/blobdiff - db/dbopt.sql
add an index on users.reservations
[moira.git] / db / dbopt.sql
index 791468c971892c9a8e4ac1680b010f9bf215013c..3d569fc163735931519f0576565805a60fceb832 100644 (file)
@@ -1,92 +1,83 @@
-modify users to cbtree unique on users_id
-CREATE INDEX i_usr_login ON users (login) 
-modify i_usr_login to btree
-
-CREATE INDEX i_usr_name ON users (first, last)
-modify i_usr_name to cbtree on first, last
-
-CREATE INDEX i_usr_last ON users (last, first)
-modify i_usr_last to cbtree on last, first
-
-CREATE INDEX i_usr_uid ON users (uid)
-modify i_usr_uid to btree
-CREATE INDEX i_usr_pop ON users (pop_id)
-modify i_usr_pop to btree
-
-modify krbmap to btree unique on users_id
-CREATE INDEX i_krb_str ON krbmap  (string_id)
-modify i_krb_str to btree
-
-modify machine to cbtree unique on mach_id
-CREATE INDEX i_mac_name ON machine (name)
-modify i_mac_name to btree
-modify cluster to cbtree unique on clu_id
-CREATE INDEX i_clu_name ON cluster (name)
-modify i_clu_name to btree
-
-modify mcmap to cbtree on clu_id
-CREATE INDEX i_mcm_mach ON mcmap (mach_id)
-modify i_mcm_mach to cbtree
-
-modify svc to cbtree on clu_id
-
-modify servers to btree on name
-
-modify serverhosts to btree on service
-CREATE INDEX i_sho_mach ON serverhosts (mach_id)
-modify i_sho_mach to cbtree
-
-modify list to cbtree unique on list_id
-CREATE INDEX i_lis_name ON list(name)
-modify i_lis_name to btree
-CREATE INDEX i_lis_mail ON list (maillist)
-CREATE INDEX i_lis_group ON list (group)
-CREATE INDEX i_lis_gid ON list (gid)
-modify i_lis_gid to btree
-
-modify imembers to cbtree on member_id, member_type
-CREATE INDEX i_imem_list ON imembers (list_id)
-modify i_imem_list to hash
-
-modify strings to cbtree unique on string_id
-CREATE INDEX i_str_name ON strings (string)
-modify i_str_name to hash
-
-modify nfsphys to cbtree unique on nfsphys_id
-CREATE INDEX i_nfs_mach ON nfsphys (mach_id)
-modify i_nfs_mach to btree
-
-modify filesys to cbtree unique on filsys_id
-CREATE INDEX i_fil_name ON filesys (label)
-modify i_fil_name to cbtree
-CREATE INDEX i_fil_mach ON filesys (mach_id)
-modify i_fil_mach to btree
-CREATE INDEX i_fil_phys ON filesys (phys_id)
-modify i_fil_phys to cbtree
-CREATE INDEX i_fil_grp ON filesys (owners)
-modify i_fil_grp to btree
-CREATE INDEX i_fil_user ON filesys (owner)
-modify i_fil_user to btree
-
-modify fsgroup to cbtree on group_id
-CREATE INDEX i_fsg_filsys ON fsgroup (filsys_id)
-modify i_fsg_filsys to btree
-
-modify quota to cbtree on entity_id
-CREATE INDEX i_qot_fil ON quota (filsys_id)
-modify i_qot_fil to cbtree
-CREATE INDEX i_qot_phys ON quota (phys_id)
-modify i_qot_phys to cbtree
-
-modify zephyr to cbtree unique on class
-
-modify hostaccess to cbtree unique on mach_id
-
-modify printcap to cbtree on name
-CREATE INDEX i_pcp_mach ON printcap (mach_id)
-modify i_pcp_mach to btree
-
-modify palladium to cbtree on name
-
-modify capacls to cbtree on tag
+create unique index i_usr_usid on users (users_id);
+create index i_usr_login on users (login);
+create index i_usr_name on  users (first, last);
+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);
+
+create unique index i_mac_mid on machine  (mach_id);
+create index i_mac_name on  machine (name);
+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 unique index i_hal_name on hostalias  (name);
+create index i_hal_id on hostalias (mach_id);
+
+create unique index i_snt_sid on subnet  (snet_id);
+create index i_snt_name on subnet (name);
+create index i_snt_saddr on subnet(saddr);
+
+create unique index i_clu_clid on clusters (clu_id);
+create index i_clu_name on  clusters (name);
+
+create index i_mcm_clid on mcmap (clu_id);
+create index i_mcm_mach on  mcmap (mach_id);
+
+create index i_svc_clid on svc (clu_id);
+
+create index i_srv_name on servers (name);
+
+create index i_sho_srv on serverhosts (service);
+create index i_sho_mach on  serverhosts (mach_id);
+
+create unique index i_lis_lid on list  (list_id);
+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_acl on list (acl_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_nfs_nid on nfsphys  (nfsphys_id);
+create index i_nfs_mach on  nfsphys (mach_id);
+
+create unique index i_fil_fid on filesys  (filsys_id);
+create index i_fil_name on  filesys (label);
+create index i_fil_mach on  filesys (mach_id);
+create index i_fil_phys on  filesys (phys_id);
+create index i_fil_grp on  filesys (owners);
+create index i_fil_user on  filesys (owner);
+
+create index i_fsg_gid on fsgroup (group_id);
+create index i_fsg_filsys on  fsgroup (filsys_id);
+
+create index i_qot_eid on quota (entity_id);
+create index i_qot_fil on  quota (filsys_id);
+create index i_qot_phys on  quota (phys_id);
+
+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);
+create index i_prn_rm on printers (rm);
+create index i_prn_loc on printers (location);
+create index i_prn_con on printers (contact);
+
+create index i_cap_tag on capacls (tag);
This page took 0.044922 seconds and 4 git commands to generate.