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: order of tables in FROM ?

Re: order of tables in FROM ?

From: Joel Garry <joelga_at_pebble.ml.org>
Date: 1998/04/29
Message-ID: <6i8gke$rra$1@pebble.ml.org>#1/1

In article <6i7nql$163a_at_fidoii.cc.Lehigh.EDU>, Phil R Lawrence <prl2_at_lehigh.edu> wrote:
>Hey, anybody can write SQL (I do), but I want to move on to a higher plain.
>
>1. Is the ordering of tables listed in the FROM statement important for
>performance?

3.1 Ordering of the FROM clause.

                    This rule is for when the oracle optimiser is 
               stuck for a good idea. The Oracle optimiser  works 
               in  the following manner. It looks at each of  the 
               WHERE  clauses and assigns the tables concerned  a 
               number based on the type of predicate e.g. field = 
               'const'  or field(+) = field. It then chooses  the 
               table with the lowest score as the driving  table. 
               But, and its a big one, if more than one table has 
               the  same  lowest score then it chooses  the  last 
               table in the FROM list to be the driving table.

>
>2. Is there a FAQ where I can start to learn what things *do* impact
>performance?
>

www.orafaq.org. The above is from selection SQL, then going to "Tina Londons'SQL Guide.

Some informative surfing off of
http://ourworld.compuserve.com/homepages/joel_garry/oracleln.htm

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Phil R Lawrence phone: 610-758-3051
>Programmer / Analyst e-mail: prl2_at_lehigh.edu
>194 Lehigh University Computing Center
>E.W. Fairchild - Martindale, Bldg. 8B
>Bethlehem, PA 18018
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>

-- 
These opinions are my own and not necessarily those of Information Quest
jgarry@eiq.com                           http://www.informationquest.com
http://ourworld.compuserve.com/homepages/joel_garry
"See your DBA?"  I AM the @#%*& DBA!
Received on Wed Apr 29 1998 - 00:00:00 CDT

Original text of this message

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