List:General Discussion« Previous MessageNext Message »
From:Shawn Green Date:August 31 2007 7:39pm
Subject:Re: JOIN migration from Oracle to MySQL
View as plain text  
spikerlion@stripped 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
Thread
JOIN migration from Oracle to MySQLspikerlion31 Aug
  • Re: JOIN migration from Oracle to MySQLBaron Schwartz31 Aug
    • Re: JOIN migration from Oracle to MySQLspikerlion31 Aug
      • Re: JOIN migration from Oracle to MySQLShawn Green31 Aug