MySQL Forums
Forum List  »  Newbie

Re: Query Structure
Posted by: Peter Brawley
Date: May 30, 2018 02:20PM

What in the world? The cascading left joins look redundant and will be very slow since each Left Join requires a complete indexless table scan on its left side, and Group By without aggregation turns the query logic to mush and returns arbitrary results.

Is this what you mean?

select p._ka_osr_num as osr, b.notes, g.notes
from proj p
left join notes b on p.__kp_proj_id = b.__kf_proj_id_budg
left join notes g on p.__kp_proj_id = g.__kf_proj_id

If not, please post an unambiguous statement of the query requirement along with results of ...

Show Create Table proj;

Show Create Table notes;

Options: ReplyQuote


Subject
Written By
Posted
May 30, 2018 01:51PM
Re: Query Structure
May 30, 2018 02:20PM


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.