Re: force a query to an index

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Fri, 14 Mar 2003 02:01:45 GMT
Message-ID: <dKaca.82623$S_4.57235_at_rwcrnsc53>


He might be trying to get the data in a different order by asking Oracle to use the index to retrieve the data. If that is what he wants, the data in a particular order, then he should use an order by and not try and rely on unspecified behavior.
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.
"Ollie" <oamd_at_yahoo.com> wrote in message
news: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 Fri Mar 14 2003 - 03:01:45 CET

Original text of this message