Re: Problem with performance!
Posted in 1998
Bloomberg L.P — — source: Informix-list mailing list archive (1991-1998)
marko kopac <marko.kopac@mais.si> wrote in article
<35112472.91C1DAE3@mais.si>...
> Hello!
>
> Could anybody help me!!!
>
> How to make my SQL quicker: SELECT * FROM tablex WHERE field1 MATCHES
> '[K,k][O,o][P,p]*'
>
> Index is made by field1, table contains 34500 records, sql working 30
> seconds. Is that normal?
This query cannot use an index as shown try this instead:
SELECT *
FROM tablex
WHERE field1 MATCHES "KOP*" OR
field1 MATCHES "KOp*" OR
field1 MATCHES "Kop*" OR
field1 MATCHES "kop*" OR
field1 MATCHES "KoP*" OR
field1 MATCHES "koP*" OR
field1 MATCHES "kOP*" OR
field1 MATCHES "kOp*" ;
Art S. Kagel