Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What's this SQL doing?

Re: What's this SQL doing?

From: Geoff Miller <camperzpamperz_at_hotmail.com>
Date: Fri, 07 Nov 2003 23:52:51 GMT
Message-ID: <nfWqb.13250$PH6.9393@twister.austin.rr.com>


http://asktom.oracle.com/pls/ask/f?p=4950:8:8458796975468775725::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1145139539037

"Thomas Kellerer" <spam_eater_at_gmx.net> wrote in message news:bod7m6$1bu8rt$1_at_ID-13919.news.uni-berlin.de...
> Prince Of Thieves schrieb:
>
> > Select c.clridx, n.price, n.perprice
> > from clr c, sprice_clrsku n where c.styleidx = 1164
> > and c.styleidx = c.styleidx and c.active = 1 and c.colouridx > 0 and
> > n.spidx(+) = 163
> > and n.clridx(+) = c.clridx order by c.clrcode;
> >
> > Notice the line "and c.styleidx = c.styleidx "? Why did the author set
this
> > SQL like this? Is this to accomplish something I do not know about?
> >
>
> I'm doing this pretty often as well. Mostly because you can force Oracle
to use
> an index on that column by including it this way. We have seen radical
changes
> in the execution plan by adding conditions like that.
>
> Thomas
>
Received on Fri Nov 07 2003 - 17:52:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US