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:02:28 +0000 (17:02 -0400)
commit579c2cb8e7bcbc8819ca4e625b0c8c9488870c71
treef005d22b9cbe0ba07e654e46693421d60fdf097c
parentb77bb9943009b81042b4ef1a6ac33ec9e3e96dd7
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]