Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Performance of REGEXP_LIKE vs LIKE?
Rene Nyffenegger schrieb:
> On 2007-04-19, Thomas Kellerer <JUAXQOSZFGQQ_at_spammotel.com> wrote:
>> On 18.04.2007 22:52 zstringer999_at_gmail.com wrote: >>> The regular expression syntax is cleaner, especially when you have a >>> lot of strings to search for! However, the LIKE expression runs in 20 >>> seconds, while the REGEXP_LIKE one runs in 60 seconds. Has anyone >>> else noticed this? Any way to speed it up? >>> >> I thought you should be able to create a function based index to support >> the regex match but I'm not sure (could have been Postgres where I did >> that the last time ;) )
Because regexp_like is not a function but condition. Here (on 10.2.0.3):
SQL> create index foo_bar_i2 on foo_bar_t(regexp_replace(b, '^([[:digit:]]+)$','\1'));
Index created.
Best regards
Maxim Received on Fri Apr 20 2007 - 01:56:33 CDT