title: Oracle - Understanding the no_index hint
body: <p>I'm trying to understand how no_index actually speeds up a query and haven't been able to find documentation online to explain it.  </p>
  
  <p>For example I have this query that ran <strong>extremely slow</strong></p>
  
  <pre><code>select  * 
      from    &lt;tablename&gt;
      where   field1_ like '%someGenericString%' and 
              field1_ &lt;&gt; 'someSpecificString' and
              Action_='_someAction_' and 
              Timestamp_ &gt;= trunc(sysdate - 2)
  </code></pre>
  
  <p>And one of our DBAs was able to speed it up significantly by doing this</p>
  
  <pre><code>select  /*+ NO_INDEX(TAB_000000000019) */ * 
      from    &lt;tablename&gt;
      where   field1_ like '%someGenericString%' and 
              field1_ &lt;&gt; 'someSpecificString' and
              Action_='_someAction_' and 
              Timestamp_ &gt;= trunc(sysdate - 2) 
  </code></pre>
  
  <p>And I can't figure out why?  I would like to figure out why this works so I can see if I can apply it to another query (this one a join) to speed it up because it's taking even longer to run.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>** Update **
  Here's what I know about the table in the example.</p>
  
  <ul>
  <li>It's a 'partitioned table'</li>
  <li>TAB_000000000019 is the table not a column in it</li>
  <li>field1 is indexed</li>
  </ul>