From: miker Date: Sat, 27 Mar 2010 20:55:28 +0000 (+0000) Subject: add useful fixed-field indexing for browse-by-FF support (yay for QueryParser!) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=96751f19309849d8788ee717fdfb937850ee1803;p=evergreen%2Fpines.git add useful fixed-field indexing for browse-by-FF support (yay for QueryParser!) git-svn-id: svn://svn.open-ils.org/ILS/trunk@16027 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 441ab66012..6a0d7263f1 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0217'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0218'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/030.schema.metabib.sql b/Open-ILS/src/sql/Pg/030.schema.metabib.sql index 17ed7dcc61..ee5701e185 100644 --- a/Open-ILS/src/sql/Pg/030.schema.metabib.sql +++ b/Open-ILS/src/sql/Pg/030.schema.metabib.sql @@ -129,8 +129,6 @@ CREATE TABLE metabib.rec_descriptor ( date2 TEXT ); CREATE INDEX metabib_rec_descriptor_record_idx ON metabib.rec_descriptor (record); -/* We may not need these... - CREATE INDEX metabib_rec_descriptor_item_type_idx ON metabib.rec_descriptor (item_type); CREATE INDEX metabib_rec_descriptor_item_form_idx ON metabib.rec_descriptor (item_form); CREATE INDEX metabib_rec_descriptor_bib_level_idx ON metabib.rec_descriptor (bib_level); @@ -143,8 +141,8 @@ CREATE INDEX metabib_rec_descriptor_cat_form_idx ON metabib.rec_descriptor (cat_ CREATE INDEX metabib_rec_descriptor_pub_status_idx ON metabib.rec_descriptor (pub_status); CREATE INDEX metabib_rec_descriptor_item_lang_idx ON metabib.rec_descriptor (item_lang); CREATE INDEX metabib_rec_descriptor_vr_format_idx ON metabib.rec_descriptor (vr_format); - -*/ +CREATE INDEX metabib_rec_descriptor_date1_idx ON metabib.rec_descriptor (date1); +CREATE INDEX metabib_rec_descriptor_dates_idx ON metabib.rec_descriptor (date1,date2); -- Use a sequence that matches previous version, for easier upgrading. CREATE SEQUENCE metabib.full_rec_id_seq; diff --git a/Open-ILS/src/sql/Pg/upgrade/0218.schema.metabib.rec_descriptor.fixed_field_indexes.sql b/Open-ILS/src/sql/Pg/upgrade/0218.schema.metabib.rec_descriptor.fixed_field_indexes.sql new file mode 100644 index 0000000000..70f74de93e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0218.schema.metabib.rec_descriptor.fixed_field_indexes.sql @@ -0,0 +1,22 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0218'); --miker + +CREATE INDEX metabib_rec_descriptor_record_idx ON metabib.rec_descriptor (record); +CREATE INDEX metabib_rec_descriptor_item_type_idx ON metabib.rec_descriptor (item_type); +CREATE INDEX metabib_rec_descriptor_item_form_idx ON metabib.rec_descriptor (item_form); +CREATE INDEX metabib_rec_descriptor_bib_level_idx ON metabib.rec_descriptor (bib_level); +CREATE INDEX metabib_rec_descriptor_control_type_idx ON metabib.rec_descriptor (control_type); +CREATE INDEX metabib_rec_descriptor_char_encoding_idx ON metabib.rec_descriptor (char_encoding); +CREATE INDEX metabib_rec_descriptor_enc_level_idx ON metabib.rec_descriptor (enc_level); +CREATE INDEX metabib_rec_descriptor_audience_idx ON metabib.rec_descriptor (audience); +CREATE INDEX metabib_rec_descriptor_lit_form_idx ON metabib.rec_descriptor (lit_form); +CREATE INDEX metabib_rec_descriptor_cat_form_idx ON metabib.rec_descriptor (cat_form); +CREATE INDEX metabib_rec_descriptor_pub_status_idx ON metabib.rec_descriptor (pub_status); +CREATE INDEX metabib_rec_descriptor_item_lang_idx ON metabib.rec_descriptor (item_lang); +CREATE INDEX metabib_rec_descriptor_vr_format_idx ON metabib.rec_descriptor (vr_format); +CREATE INDEX metabib_rec_descriptor_date1_idx ON metabib.rec_descriptor (date1); +CREATE INDEX metabib_rec_descriptor_dates_idx ON metabib.rec_descriptor (date1,date2); + +COMMIT; +