Re: force a query to an index
From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Thu, 13 Mar 2003 14:41:53 GMT
Message-ID: <RM0ca.65470$eG2.10132_at_sccrnsc03>
Date: Thu, 13 Mar 2003 14:41:53 GMT
Message-ID: <RM0ca.65470$eG2.10132_at_sccrnsc03>
A hint is just that a hint. The optimizer can choose to ignore it. Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Ralf" <Miko_at_boehrer.de> wrote in message news:fa624200.0303130434.1a750860_at_posting.google.com...Received on Thu Mar 13 2003 - 15:41:53 CET
> 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