How to optimize a very slow query?
give me an example how to do it


Get something like

SELECT t1.email
     , t1.telegram
     , t1.twitter
     , t1.address
     , COALESCE(t2.email, '') AS refer_email
     , count(t3.referrer) AS refer_count
FROM wpkx_airdrop_claim AS t1
LEFT JOIN wpkx_airdrop_claim AS t2 ON t1.referrer = t2.refer_link
LEFT JOIN wpkx_airdrop_claim AS t3 ON t3.referrer = t1.refer_link
WHERE t1.post_id = 8037
GROUP BY t1.id
/* If ONLY_FULL_GROUP_BY, replace with
GROUP BY t1.email
       , t1.telegram
       , t1.twitter
       , t1.address
       , COALESCE(t2.email, '') AS refer_email
*/
ORDER BY refer_count DESC


And create indices by: (post_id, referrer, refer_link), (referrer) and (refer_link). Then test does they are used.