I'm using "SQL*Plus: Release 10.2.0.1.0 - Production" and have a table
foo with a field
I have created a clustered B+tree index on the field
foodID of my table
And I do the following:
explain plan set assignment_id='' for select foo_id from foo;
which creates the following plan:
0 SELECT STATEMENT 1 0 TABLE ACCESS FULL FOO
then I add the following hint:
explain plan set assignment_id='' for select /*+ INDEX(foo) */ foo_id from foo;
but still got the same plan without using my index.
I'm sure the index is correctly created, and I also executed
analyze table foo compute statistics;. I also tried the above in three different optimization modes: RULE, CHOOSE, ALL_ROWS.
So why doesn't my hint work? Any ideas would be rally helpful!