force a query to an index

From: Ralf <Miko_at_boehrer.de>
Date: 13 Mar 2003 04:34:17 -0800
Message-ID: <fa624200.0303130434.1a750860_at_posting.google.com>


Hi,

I want to use an index-hint within a select-statement. But it doesn't work.
Can you please tell me what I did wrong ?

I have a table (field: "Id" and "Nr").
I have 2 indexes "ind_Nr" and "ind_Id" and did the following statement:

select /*+ index (ind_Nr) */
  id,Nr

from table
where Nr > 4711
and Rownum < 3;

select /*+ index (ind_id) */
  id,Nr
from table
where Nr > 4711
and Rownum < 3;

Although I expect to get different result-sets (because of different indexes), both results are the same.

If you have any idea or comment, please help me. Thanks in advance.
 Ralf Received on Thu Mar 13 2003 - 13:34:17 CET

Original text of this message