MySQL Forums
Forum List  »  Partitioning

Re: query optimization
Posted by: Rick James
Date: October 30, 2015 04:58PM

    where  p.host_name in (
        SELECT  node_name
            from  oam_db.node
            where  cluster_name='AIRTEL_TANZANIA_MOBIQUITY' 
--> (to avoid the poor performance of "IN ( SELECT ...)")
    JOIN   oam_db.node AS n
        ON n.node_name = p.host_name
    where  n.cluster_name='AIRTEL_TANZANIA_MOBIQUITY'

Avoid leading '%' when possible


INDEX(cluster_name, node_name)

There may be more suggestions. If these suggestions do not suffice, please provide SHOW CREATE TABLE.

Options: ReplyQuote

Written By
October 29, 2015 03:08AM
Re: query optimization
October 30, 2015 04:58PM

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.