Create a bunch of new indexes so that the new actor.usr_delete
and actor.usr_purge_data procedures won't have to do full
table scans.
The CREATE INDEX statements are sprinkled across seven different
installation scripts. Here there are all in one place, for
updating an existing database:
-- 200.schema.acq.sql
CREATE INDEX fund_alloc_allocator_idx ON acq.fund_allocation ( allocator );
CREATE INDEX li_creator_idx ON acq.lineitem ( creator );
CREATE INDEX li_editor_idx ON acq.lineitem ( editor );
CREATE INDEX li_selector_idx ON acq.lineitem ( selector );
CREATE INDEX li_note_creator_idx ON acq.lineitem_note ( creator );
CREATE INDEX li_note_editor_idx ON acq.lineitem_note ( editor );
CREATE INDEX li_usr_attr_def_usr_idx ON acq.lineitem_usr_attr_definition ( usr );
CREATE INDEX acq_picklist_owner_idx ON acq.picklist ( owner );
CREATE INDEX acq_picklist_creator_idx ON acq.picklist ( creator );
CREATE INDEX acq_picklist_editor_idx ON acq.picklist ( editor );
CREATE INDEX acq_po_note_creator_idx ON acq.po_note ( creator );
CREATE INDEX acq_po_note_editor_idx ON acq.po_note ( editor );
CREATE INDEX po_creator_idx ON acq.purchase_order ( creator );
CREATE INDEX po_editor_idx ON acq.purchase_order ( editor );
-- 090.schema.action.sql
CREATE INDEX circ_all_usr_idx ON action.circulation ( usr );
CREATE INDEX circ_circ_staff_idx ON action.circulation ( circ_staff );
CREATE INDEX circ_checkin_staff_idx ON action.circulation ( checkin_staff );
CREATE INDEX ahn_notify_staff_idx ON action.hold_notification ( notify_staff );
CREATE INDEX hold_request_fulfillment_staff_idx ON action.hold_request ( fulfillment_staff );
CREATE INDEX hold_request_requestor_idx ON action.hold_request ( requestor );
CREATE INDEX action_in_house_use_staff_idx ON action.in_house_use ( staff );
CREATE INDEX non_cat_in_house_use_staff_idx ON action.non_cat_in_house_use ( staff );
CREATE INDEX action_non_cat_circ_patron_idx ON action.non_cataloged_circulation ( patron );
CREATE INDEX action_non_cat_circ_staff_idx ON action.non_cataloged_circulation ( staff );
CREATE INDEX action_survey_response_usr_idx ON action.survey_response ( usr );
-- 005.schema.actors.sql
CREATE INDEX actor_usr_note_creator_idx ON actor.usr_note ( creator );
CREATE INDEX usr_org_unit_opt_in_staff_idx ON actor.usr_org_unit_opt_in ( staff );
CREATE INDEX actor_usr_standing_penalty_staff_idx ON actor.usr_standing_penalty ( staff );
-- 040.schema.asset.sql
CREATE INDEX asset_call_number_note_creator_idx ON asset.call_number_note ( creator );
CREATE INDEX cp_creator_idx ON asset.copy ( creator );
CREATE INDEX cp_editor_idx ON asset.copy ( editor );
CREATE INDEX asset_copy_note_creator_idx ON asset.copy_note ( creator );
-- 901.audit-tables.sql
CREATE INDEX aud_actor_usr_address_hist_id_idx ON auditor.actor_usr_address_history ( id );
CREATE INDEX aud_actor_usr_hist_id_idx ON auditor.actor_usr_history ( id );
CREATE INDEX aud_asset_cn_hist_creator_idx ON auditor.asset_call_number_history ( creator );
CREATE INDEX aud_asset_cn_hist_editor_idx ON auditor.asset_call_number_history ( editor );
CREATE INDEX aud_asset_cp_hist_creator_idx ON auditor.asset_copy_history ( creator );
CREATE INDEX aud_asset_cp_hist_editor_idx ON auditor.asset_copy_history ( editor );
CREATE INDEX aud_bib_rec_entry_hist_creator_idx ON auditor.biblio_record_entry_history ( creator );
CREATE INDEX aud_bib_rec_entry_hist_editor_idx ON auditor.biblio_record_entry_history ( editor );
-- 070.schema.container.sql
CREATE INDEX user_bucket_item_target_user_idx ON container.user_bucket_item ( target_user );
-- 080.schema.money.sql
CREATE INDEX m_c_t_collector_idx ON money.collections_tracker ( collector );
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13615
dcc99617-32d9-48b4-a31d-
7c20da2025e4