[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 02b6bc50ae6df2ea06cede9f77f88dc1a074bf0c
Evergreen Git
git at git.evergreen-ils.org
Tue May 17 00:56:49 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_0 has been updated
via 02b6bc50ae6df2ea06cede9f77f88dc1a074bf0c (commit)
from b3bedbdf7d43baa45ddbe15ea6afc2b9fad476a5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 02b6bc50ae6df2ea06cede9f77f88dc1a074bf0c
Author: Dan Scott <dan at coffeecode.net>
Date: Tue May 17 00:29:47 2011 -0400
LP#783486: Improve authority lookup performance
Testing showed that the two indexes added herein improve
authority lookup performance radically; on a 16 GB RAM
database server with 1.1M records, lookup times decreased
from 5500 ms to 0.223 ms. Recommended, would EXPLAIN ANALYZE
again.
Signed-off-by: Dan Scott <dan at coffeecode.net>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 35589de..ab658d7 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0529'); -- miker, for Joseph Lewis and Michael Peters
+INSERT INTO config.upgrade_log (version) VALUES ('0535'); -- dbs
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/011.schema.authority.sql b/Open-ILS/src/sql/Pg/011.schema.authority.sql
index 133a243..f48e223 100644
--- a/Open-ILS/src/sql/Pg/011.schema.authority.sql
+++ b/Open-ILS/src/sql/Pg/011.schema.authority.sql
@@ -37,6 +37,7 @@ CREATE TABLE authority.record_entry (
);
CREATE INDEX authority_record_entry_creator_idx ON authority.record_entry ( creator );
CREATE INDEX authority_record_entry_editor_idx ON authority.record_entry ( editor );
+CREATE INDEX authority_record_deleted_idx ON authority.record_entry(deleted) WHERE deleted IS FALSE OR deleted = false;
CREATE TRIGGER a_marcxml_is_well_formed BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE biblio.check_marcxml_well_formed();
CREATE TRIGGER b_maintain_901 BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE evergreen.maintain_901();
CREATE TRIGGER c_maintain_control_numbers BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE maintain_control_numbers();
@@ -84,6 +85,7 @@ CREATE TABLE authority.full_rec (
CREATE INDEX authority_full_rec_record_idx ON authority.full_rec (record);
CREATE INDEX authority_full_rec_tag_subfield_idx ON authority.full_rec (tag, subfield);
CREATE INDEX authority_full_rec_tag_part_idx ON authority.full_rec (SUBSTRING(tag FROM 2));
+CREATE INDEX authority_full_rec_subfield_a_idx ON authority.full_rec (value) WHERE subfield = 'a';
CREATE TRIGGER authority_full_rec_fti_trigger
BEFORE UPDATE OR INSERT ON authority.full_rec
FOR EACH ROW EXECUTE PROCEDURE tsearch2(index_vector, value);
diff --git a/Open-ILS/src/sql/Pg/upgrade/0535.schema.authority_indexes.sql b/Open-ILS/src/sql/Pg/upgrade/0535.schema.authority_indexes.sql
new file mode 100644
index 0000000..cf55c58
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0535.schema.authority_indexes.sql
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0535'); --dbs
+
+CREATE INDEX authority_record_deleted_idx ON authority.record_entry(deleted) WHERE deleted IS FALSE OR deleted = false;
+
+CREATE INDEX authority_full_rec_subfield_a_idx ON authority.full_rec (value) WHERE subfield = 'a';
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/011.schema.authority.sql | 2 ++
.../Pg/upgrade/0535.schema.authority_indexes.sql | 9 +++++++++
3 files changed, 12 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0535.schema.authority_indexes.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list