MySQL Forums
Forum List  »  Newbie

Re: query problem..
Posted by: Jay Pipes
Date: July 30, 2005 07:58AM

Baris Cicek wrote:
> Using left join make you increase records
> with cartesian multiply which is
> 5000*11000*11000*10000. Insted use direct join and
> indexes.

This is incorrect. A left join returns all the records from the left side of the equation, matched with records from the right table in the equation, or NULL if not found. A cross join returns a cartesian product, which returns a row for each combination of every row in each table.

However, Baris, you are correct that the left outer join is probably not Rajesh wants; the query is indicative of a denormalized schema or one which has a lot of possible NULL fields. Perhaps Rajesh can say, in English, what he's attempting to do in the query, then we could help out?

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Written By
Posted
July 30, 2005 12:52AM
July 30, 2005 06:51AM
Re: query problem..
July 30, 2005 07:58AM
July 30, 2005 11:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.