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 -> Join Across a Link

Join Across a Link

From: Jeffrey Michael Gerber <jeffrey_gerber_at_mail.amsinc.com>
Date: 1998/02/02
Message-ID: <34D61525.39E5F713@mail.amsinc.com>#1/1

We have the following piece of SQL (actually, it's longer, but this is the relevant part):

	 WHERE    ( "A"."NUM" = "C"."ID") AND
		      ( "A"."NUM" = 12)


The "A" table is in the current database while the "C" table is in another database accessed via link. Is it true that a join across a link will bring back ALL rows and then do the join (i.e., we'll get all rows in "C" and then it'll compare it to the row in "A" which NUM = 12)? Our client has suggested the following...

        WHERE C.NUM = 12 AND A.ID = 12 That is, to get rid of the join. Does this make sense? Are we defeating some Oracle optimization? Is this actually equivalent (i.e., will we always get the same result set from both statements)?

Thanks!

-Jeff Received on Mon Feb 02 1998 - 00:00:00 CST

Original text of this message

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