Hi, All,

  On a million row table, test, there is primary key on column a. 

when  I run select /*+ index (test,indx_a) */ a, b, c, from test, according to Oracle, 
I should get the following explain plan.
TABLE ACCESS
BY INDEX ROWID test 1 
INDEX
UNIQUE SCAN PK_test 1

But I acctucally got :
 TABLE ACCESS
FULL                           test                              1

The database optimizer mode is choose, and I  gathered the statistics on table and 
index using dbms_utitlity and analyze.
In the session level, I also set optimizer_mode=first_rows to push optimizer to choose 
the index.
According to Oracle Doc "use hints to force the optimizer to use the optimal execution 
plan.", to my understanding, the explain plan under such a situation, should be the 
first one. 

Does Oracle follow the hint? or to waht extents, it follows?

Appreciated if someone guides me to the right direction.

Chuan,








Unless otherwise stated, this e-mail does not represent the views of 
TransACT Communications Pty Limited.  This text and any attachments of 
this e-mail are confidential and may be legally privileged.  This email 
is for the use of the intended recipient only. If you are not the intended 
recipient do not take any action in relation to this email, other than to 
notify TransACT Communications by replying to this e-mail and destroying 
the original communication.  Except as required by law, TransACT 
Communications does not represent that this transmission is free of errors, 
viruses or interference.


Reply via email to