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: joins and performances : general question

Re: joins and performances : general question

From: aakash bordia <bordia_at_students.uiuc.edu>
Date: Mon, 22 Nov 1999 23:07:23 -0600
Message-ID: <Pine.GSO.4.10.9911222304370.24312-100000@ux13.cso.uiuc.edu>


Yes, you should actually order the tables in such a way that the table with the least number of selected rows should be placed first in the join (i.e. its selectivity should be low) and so on. this is just like the case of optimal matrix chain multipication problem. A database engine would usually do all this stuff for you since now a days they have optimizers which are sophisticated. Outer joins should only be used if you want to deal with null values. -Aakash

Christian Bruno mailed on Today :

hello,
it is a very general question :

i have to write sql queries using lot of Joins (mainly left outer and inner joins)

is there rule(s) to apply to write these sql orders, having knowledge of the average number of rows in my tables ? for example : which order to use for joins in a particular query ? is it better to begin or to end with the join that retrieves the more rows in the database ? it is better to use INNER joins than LEFT OUTER JOINS ?

thanks for any comments or ideas !
Regards,
Christian

Aakash Bordia, MS candidate
Department of Computer Science, 1252 DCL University of Illinois, Urbana Champaign Phone : 217-332-2397(H) 217-244-7202(O) Received on Mon Nov 22 1999 - 23:07:23 CST

Original text of this message

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