Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LIKE vs INSTR

Tyson JougletMar 25 2008 — edited Mar 27 2008
So I have heard that INSTR is an efficient way of comparing text and should be faster than LIKE. When trying to speed up a query with a runtime of ~45 seconds which had the line:

EM.EMP NOT LIKE 'JOB' || '%'

I replaced it with:

INSTR(EM.EMP, 'JOB' ) = 0

the query took somewhere around 4 minutes to run. Any idea why the query would take so long to use INSTR?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2008
Added on Mar 25 2008
24 comments
18,269 views