Re: force a query to an index
Date: 13 Mar 2003 09:48:22 -0800
Message-ID: <82f47a3c.0303130948.363ec01d_at_posting.google.com>
"Jim Kennedy" <kennedy-down_with_spammers_at_attbi.com> wrote in message news:<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...
> > 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.
I never knew that using different index structure for the same query will give you different result set. I thought indexes will only affect the access path to your data.
> >
> > If you have any idea or comment, please help me.
> > Thanks in advance.
> > Ralf
Received on Thu Mar 13 2003 - 18:48:22 CET