title: Fastest way to search in a BLOB - Oracle Database
body: <p>I know that searching a text in a BLOB is this way in an oracle database</p>
  
  <pre><code>select *
    from table1
   where dbms_lob.instr (t1, -- the blob
                     utl_raw.cast_to_raw ('foo'), -- the search string cast to raw
                     1, -- where to start. i.e. offset
                     1 -- Which occurrance i.e. 1=first
                      ) &gt; 0 -- location of occurrence. Here I don't care.  Just find any
  ;
  </code></pre>
  
  <p>credit @Olafur Tryggvason </p>
  
  <p>But it's very slow,  I takes than 10 minutes !</p>
  
  <p>Is there a faster way to search text in a BLOB ?</p>
  
  <p>PS : I'm using JDBC to consume this database</p>
  
  <p>Thanks</p>