SELECT * FROM tbl WHERE datanumber LIKE '%12345%' OR LIKE '%54321%'
OR LIKE '%8766%' OR LIKE '%009%', ..
The number of OR/LIKES are in the order of 50-100 items...
the table tbl is a couple of million rows.
Are the fixed strings in the wildcards "words" (i.e., are they
completely arbitrarily embedded in the text, or are they delimited in
some regular way)? If they are "words," you might consider using the
full text functionality to create an index of them, and searching
using that.
--
-- Christophe Pettus
xof@xxxxxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general