Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: JOIN migration from Oracle to MySQL

From: Shawn Green <shawn(at)mysql.com>
Date: Fri Aug 31 2007 - 15:39:09 EDT


spikerlion@gmx.de wrote:
> Hello,
>
> thank you - now it works.
>
> d_parenttype PT1 LEFT OUTER JOIN t_booklists bl ON (PT1.ID = bl.PARENTTYPE_1),
> d_parenttype PT2 LEFT OUTER JOIN t_booklists bk ON (PT2.ID = bk.PARENTTYPE_2)
>
>
> I had to put the alias to all listet fields in the select.
>

Unless you are relating PT1 to PT2 in some way, you should not expect this query to perform well because you will be generating a Cartesian product between PT1 and PT2. I doubt this is actually what you are trying to do (although it will eventually work). If you posted just a few more details about the query you are trying to write, we could try to help you to rewrite it in a way that will perform much better than the translation you just attempted.

-- 
Shawn Green, Support Engineer
MySQL Inc., USA, www.mysql.com
Office: Blountville, TN
     __  ___     ___ ____  __
    /  |/  /_ __/ __/ __ \/ /
   / /|_/ / // /\ \/ /_/ / /__
  /_/  /_/\_, /___/\___\_\___/
         <___/
  Join the Quality Contribution Program Today!
  
http://dev.mysql.com/qualitycontribution.html

-- 
MySQL General Mailing List
For list archives: 
http://lists.mysql.com/mysql
To unsubscribe:    
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Fri Aug 31 15:40:09 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:08:22 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library