Vandelay: Fix index-miss with MARC Imports using Match Sets user/senator/like-any-considered-harmful
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 26 Jun 2012 00:00:33 +0000 (20:00 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 26 Jun 2012 00:07:29 +0000 (20:07 -0400)
commit42349eaed573b768a998fc5d12c6f9d15b9a3e37
tree80d044bc4f0cd8fd93fc22a45c5f161a5d2876ba
parent13d4fbac3cb5905da1baad673fe8418b6245a053
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>
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]