MySQL Forums
Forum List  »  NDB clusters

Pushing query execution to DataNode
Posted by: Kok Fong Lau
Date: July 13, 2015 11:33PM

I'm trying to run the following query in MySQL Cluster:

select * from (
select
a.*,
@row_num := if (@curr_score = score, @row_num + 1, 1) as rn,
@curr_score := score
from
score_result a
order by score, created_dt desc
) where rn = 1;

The score_result table has 5 million records.

Running the above query, we realized that the sql node is requesting the data from the data node then processed within the sql node.

This would explain why the query is slow.

For joins there's a ndb_join_pushdown flag which let's the data node perform the join filter first then only send to the sql node.

Is there an equivalent parameter for the above query such that I want the data to be processed in the data node then only extract the records where rn = 1;

Options: ReplyQuote


Subject
Views
Written By
Posted
Pushing query execution to DataNode
1888
July 13, 2015 11:33PM


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.