If the tables are all analyzed, and cost-based optimizer is enabled, the order in the FROM clause does not matter (it would matter only if you added an /*+ ORDERED(...) */ hint.
I'm not sure what you mean by your question about "guidelines" in the predicate. I assume you're trying to tune the query. You have indices on every column mentioned? How large are these tables? --- [EMAIL PROTECTED] wrote: > Hi DBAs, > > Oracle 8.1 > We have the following query where each field name is a separate > index. My > question is does it matter the order of table names in the from > clause. I > assume > that phy_contracts is the driving table. Also what guidelines should > I use > in the predicate,i.e.,cardinality,etc.? The tables are analyzed. > > Thanks > Rick > > > SELECT COUNT(a.phy_contract_id) > FROM accrued_and_paid a, phy_contracts b > WHERE a.hold_payment_flag = 'Y' > AND b.phy_contract_id = a.phy_contract_id > AND b.company_id = 16 > AND b.contract_type = 'IC'; > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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). ===== Paul Baumgartel, Adept Computer Associates, Inc. [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Paul Baumgartel INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).