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 -> SQL Tuning question

SQL Tuning question

From: Dan <daniel.ostertag_at_visaer.com>
Date: 19 Oct 2005 10:45:32 -0700
Message-ID: <1129743932.538171.278150@g14g2000cwa.googlegroups.com>


I'm trying to put together some general 'best practices' for writing sql queries. I've been reading several books, docs, etc. One thing I've read very little about, but have heard about, is the order of filters in the 'where' clause and whether a field is on the right side or left side of the equal sign.

For example, in a query such as
select a.xxx, b.yyy, c.zzz from table1 a, table2 b, table3 c where

   a.aaa = b.bbb and
   b.aaa = c.ccc and
   b.ddd = 'XXX';

I've read about using the smallest table as the driving table, but other than that, the order of the tables or whether b.aaa=c.ccc or c.ccc=b.aaa is correct, I can find very little about.

Does anyone have any info or general rules on this or a reference as to where I could read more (or perhaps tell me it's not important).

Thanks,
Dan Received on Wed Oct 19 2005 - 12:45:32 CDT

Original text of this message

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