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:15:01 +0000 (17:15 -0400)
commitb82c278f404a142bb55d3659d61c5acf1087cf4c
tree0373e0d2ade9119c7f9521aa7bbdb20e2296f89d
parent2e4ea92f7090bbd9c8db015e91548d69edfd470a
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]