Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Why does this query need a table access by rowid?
> So, the index is recognized, and that's great. My question is, why is
> the TABLE ACCESS BY ROWID required?
> Since only the DOC_ID is in the select list, why the table access?
Since in the index you don't have the DOC_ID column, you have only the function of DOC_ID in your index and Oracle isn't smart enough to look inside the function to see whether the funcion leaves the value unaltered...
Try to do a composite index on f(doc_id), doc_id.
Tanel.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Fri Jul 23 2004 - 13:14:13 CDT