@Alex Papadimoulis said:
But that's not how Oracle works. If
you were to sit Oracle down in the library, and ask it to find the same
(non-indexed) info from all books by Garrison Keillor, it would start
at the first book, look at the author, write down the information
if it is the right author, and then move on to the next book, and to
the next, all the way through all the library. It's to supid to realize
that it can write down the Dewey numbers, then go to the book shelf to
find the non-indexed data.
It all depends on your data and whether you have collected statistics.
If all or most of your books have the same status, then there's little
point going to the index first and then 'going to the shelf' - you
might as well look at everything on the shelf and weed out the small
number of irrelevant books as you look at them.
The 'cost' is purely a method of comparing possible executions of the
'SAME' query - a cost of 4000 means nothing in relation to a cost of 2
if the underlying queries are different.