title: Optimizing String-Searching Oracle Query
body: <p>I'm trying to optimizing an Oracle Query that looks like this:</p>
  
  <pre><code>select * from upcTable where upc like '%567%'
  </code></pre>
  
  <p>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?</p>
  
  <p>I've tried doing something like </p>
  
  <pre><code>select * from
  (select * from rldb.productmaster where upc like '%567%')
  where upc like '%380%'
  
  select * from rldb.productmaster where upc like '%567380%'
  </code></pre>
  
  <p>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.</p>