In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
SELECT
COUNT(crm.id) AS total_record,
SUM(UPPER(opt_in_marketing) = 'NO') AS unsub_email_count,
SUM(is_bademail = 1) AS invalid_email_count,
COUNT(DISTINCT mp.`contact_id`) AS inactive_email_count,
SUM(is_retired = 1
OR is_mice_retired = 1) AS retired_count
FROM
(`tbl_contact_173_230` AS crm)
INNER JOIN
`tbl_mandrill_email_mapping` AS mem
ON `mem`.`email` = `crm`.`email_address`
LEFT JOIN
`tbl_master_partition` AS mp
ON `mp`.`contact_id` = `crm`.`contact_id`
AND crm.`ta_submitted_date` < '2016-10-19'
AND FIND_IN_SET(5,
mp.`inactive_group`) > 0
WHERE
`crm`.`email_address` != ''
AND `mem`.`log_id` = 'xxxx'
AND `mem`.`open` = 0
AND `mem`.`hard_bounce` = 0
AND `mem`.`reject` = 0
AND `mem`.`spam` = 0
ORDER BY
`crm`.`id` ASC