MySQL Forums
Forum List  »  Optimizer & Parser

Query optimization for slow query
Posted by: Mohammed Munazir Ul Hasan
Date: October 15, 2011 03:03AM

We are using MySQL Cluster 7.2.1 (Development Milestone) with 4 Data Nodes each with 20 GB RAM and 4x4 CPUs

This Query taking 150.45 seconds on NDB (Cluster) where as on Standalone i.e. MyISAM its taking 3.69 seconds

Select A.* , B.* , C.* ,SUM(D.Length_Of_Training*D.Training_Fee) as Training_Fee
, SUM(D.Length_Of_Training*D.Total_Training_Salary) as Total_Training_Salary
, SUM(D.Length_Of_Employment*D.Total_Employment_Salary) as Total_Employment_Salary
FROM cbp_pcetcontract A , cbp_contractdeliverable D, cbp_contract E , cbp_position C , cbp_bpprofile B
where D.Contract_ID = E.Contract_ID
and A.ContractDeliverableId = D.CD_Id
and A.PositionId = C.Position_ID
and B.BP_Id = A.BP_Id;

Any body can optimize this query or can help me in this.


Options: ReplyQuote

Written By
Query optimization for slow query
October 15, 2011 03:03AM

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.