[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 6854ddfdc114d26239aa22ff453fa12a2a1a7a26

Evergreen Git git at git.evergreen-ils.org
Tue May 17 00:56:25 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_1 has been updated
       via  6854ddfdc114d26239aa22ff453fa12a2a1a7a26 (commit)
      from  f2a547a6c0bcf50e7df6dfa5bd5467c342115487 (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 6854ddfdc114d26239aa22ff453fa12a2a1a7a26
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 ce2e987..0a22bc7 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 ('0534'); -- gmc
+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