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>
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.
I have a table (field: "Id" and "Nr").
select /*+ index (ind_Nr) */
Can you please tell me what I did wrong ?
I have 2 indexes "ind_Nr" and "ind_Id" and did the following statement:
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.