Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Table scan ....
raquel_rodriguezus_at_yahoo.com (Raquel) wrote in
news:9a73b58d.0407272150.37acf334_at_posting.google.com:
> I have this simple query:
>
> SELECT COUNT(*)
> FROM T1, T2
> WHERE T1.COL1 = T2.COL2
>
> There is a unique index on COL1 (on table T1) and a unique index on
> COL2 (on table T2). Then why does the Explain plan show me that Oracle
> is using a table scan on T1 and T2? Should it not have used indexes on
> both tables?
>
> TIA
> Raquel.
COL1 & COL2 may be different data type;
which requires a conversion/function be applied to one of them;
which precludes using this index.
Received on Wed Jul 28 2004 - 20:04:16 CDT