''),
IFNULL(contacts.state, ''),
IFNULL(contacts.postalcode, ''),
IFNULL(campaigns.name, ''),
IFNULL(contacts.status, ''),
cdrs.clientid,
clients.name,
cdrs.callid,
cdrs.voicemailid
FROM cdrs USE INDEX (cdrs_answerdate)
straight_join clients ON clients.id = cdrs.clientid
JOIN dids ON dids.id = cdrs.didid
LEFT JOIN users AS agents ON agents.id = cdrs.agentid
LEFT JOIN dispositions ON dispositions.id = cdrs.dispositionid
LEFT JOIN contacts ON contacts.id = cdrs.contactid
LEFT JOIN campaigns ON campaigns.id = cdrs.campaignid
WHERE 1=1
AND clients.resellerid = 2
AND (cdrs.calldate >= '2021-08-24 15:59:59.999')
AND (cdrs.calldate <= '2021-08-31 15:59:59.999')
order by id desc
limit 25;
https://pastebin.com/9Sdm4vdU
На сколько долго он выполняется по сравнению с первым?
Обсуждают сегодня