I'm trying to optimizing an Oracle Query that looks like this:
select * from upcTable where upc like '%567%'
The query is fast for small search terms like 567, however it can get as long as 15 digits in which it can take ~1.5 seconds. Is there anyway to speed this up?
I've tried doing something like
select * from
(select * from rldb.productmaster where upc like '%567%')
where upc like '%380%'
select * from rldb.productmaster where upc like '%567380%'
In this case, the number of terms if about the same, but the first example is a bit faster. However when using the same technique for 15 digits, it's a bit faster but still too slow.