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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sql Tuning

RE: Sql Tuning

From: Elliott, Patrick <Patrick.Elliott_at_bestbuy.com>
Date: Fri, 12 May 2000 13:38:17 -0500
Message-Id: <10495.105549@fatcity.com>


Try replacing the OR with an AND like
a.stat_code > 0 and a.stat_code < 3
In general AND's perform better than OR's because an OR may cause multiple scans.

> -----Original Message-----
> From: Navtej B [SMTP:navtej_b_at_YAHOO.COM]
> Sent: Friday, May 12, 2000 12:39 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Sql Tuning
>
> please tell me how to make it fast
>
> SELECT a.id,a.uid,
> a.orderid,
> a.invcid,
> a.qid,
> a.carrierid
> from master_tbl a
> where (((a.Start_dt<='10-MAR-00') and
> ((a.Stat_code=1) or (a.Stat_code=2))) and
> (a.edi_code=1))
> order by a.Start_dt asc,
> a.Party_name desc,
> a.Query_dt asc
>
> Here cardinality for Stat_code is very low
>
> Can somebody provide guidelines for tuning
>
> Thanks
> NavBir
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> --
> Author: Navtej B
> INET: navtej_b_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Fri May 12 2000 - 13:38:17 CDT

Original text of this message

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