[open-ils-commits] r12675 - trunk/Open-ILS/src/sql/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 25 22:39:23 EDT 2009
Author: dbs
Date: 2009-03-25 22:39:21 -0400 (Wed, 25 Mar 2009)
New Revision: 12675
Modified:
trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql
Log:
Additional indexes on authority.full_rec. Thanks, EXPLAIN ANALYZE.
These reduced query times on a system with > 1 million authority records from 23000ms to 500ms. 'Nuff said!
Modified: trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql 2009-03-25 20:38:59 UTC (rev 12674)
+++ trunk/Open-ILS/src/sql/Pg/011.schema.authority.sql 2009-03-26 02:39:21 UTC (rev 12675)
@@ -70,6 +70,8 @@
index_vector tsvector NOT NULL
);
CREATE INDEX authority_full_rec_record_idx ON authority.full_rec (record);
+CREATE index authority_full_rec_subfield_idx ON authority.full_rec (subfield);
+CREATE index authority_full_rec_tag_idx ON authority.full_rec (tag);
CREATE INDEX authority_full_rec_tag_part_idx ON authority.full_rec (SUBSTRING(tag FROM 2));
CREATE TRIGGER authority_full_rec_fti_trigger
BEFORE UPDATE OR INSERT ON authority.full_rec
More information about the open-ils-commits
mailing list