Vandelay: Fix index-miss with MARC Imports using Match Sets
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 26 Jun 2012 00:00:33 +0000 (20:00 -0400)
committerDan Wells <dbw2@calvin.edu>
Tue, 4 Sep 2012 21:18:32 +0000 (17:18 -0400)
commit0a2007b4efb151e5221c653f217869eec1b2b80e
tree174defca310d8b7fc24f2c5bfc3fd1cfc8645c66
parent304d7065458cfc6c01043c2c6f529abaa50e19f7
Vandelay: Fix index-miss with MARC Imports using Match Sets

In some Postgres installations, an expression such as:

(value LIKE '13423488%' OR value LIKE '245425%') will use a btree index,
but

value LIKE ANY('{13423488%,245425%}'::TEXT[])

will not.

Missing such an index can make matching incoming bibs based on a field
that's present in most of your existing records terrifically slow.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay.import-match-no-like-any.sql [new file with mode: 0644]