MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimize Query for ndb 7.2.1....
Posted by: Massimo Brignoli
Date: October 26, 2011 06:46AM

Hi Munazir,

how many rows are retrieved by the query *before* the group by?

if you execute

Select count(*)
FROM cbp_pcetcontract A,
cbp_bpprofile B,
cbp_position C,
cbp_contractdeliverable D,
cbp_contract E
where A.BP_Id = B.BP_Id
and A.BP_Id = B.BP_Id
and A.PositionId = C.Position_ID
and D.Contract_ID = E.Contract_ID
and A.ContractDeliverableId=D.CD_Id

what is the result?

Remember that the joins are pushed down but the group by and order by are still executed in the MySQL server, not in the data nodes.
So if the count(*) gives 100.000 rows for example, the data nodes in 7.2 execute the joins but they return 100.000 rows to the mysql server through the network and then the mysql server group and order them.

Massimo

Options: ReplyQuote


Subject
Views
Written By
Posted
782
October 26, 2011 03:35AM
Re: Optimize Query for ndb 7.2.1....
847
October 26, 2011 06:46AM


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.