index hint returns wrong results

  • From: "Terrian, Thomas J CTR (US)" <Tom.Terrian.ctr@xxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 8 Mar 2016 12:32:34 +0000

Oracle 12c.

Am I missing something or is this a bug?  Using an index hint returns the wrong 
results.  Does it matter if the table is partitioned and the index is global or 
even what fields are in the index?  I can't see how any of that should matter.  
The results should be the same:
    

select /*+ index(t1 ind1) */ count(*)
from scott.t1 
where f1 = 'one' and f2 = ' ';
 
  COUNT(*)
----------
         2

select count(*)
from scott.t1 
where f1 = 'one' and f2 = ' ';

  COUNT(*)
----------
         1


--
//www.freelists.org/webpage/oracle-l


Other related posts: