Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> using INDEX or not with same WHERE clause
Hello group
I'm Working on Oracle parallel Server (2 nodes) 8.1.7.
I've got a big table (>500 000 rows)
I'm using EXPLAIN PLAN and plan_table to understand how CBO execute my query. I've done an "analyze table tlogs estimate statistics" before.
Here is my query : select count(*) from tlogs where column1='A VALUE';
This give me the result '9' in six second.
and when i do a
select column2 from tlogs where column1='A VALUE';
This give me the nine rows in more than 2 minutes.
Explain PLAN tell me that in the first query, the index on column1 is used, and in the second case, the index on column1 is NOT use and there is a full table scan.
I don't understand why Oracle choosing an FTS in the second case (with the same WHERE condition)
Thanks for your help. Received on Wed Dec 12 2001 - 09:08:39 CST