I have more 300,000 rows in my table.I want to remove duplicate row and same data. So I run these query.
$sql=mysql_query("SELECT DISTINCT n1.id FROM dv2xp_adsmanager_ads n1, dv2xp_adsmanager_ads n2 WHERE n1.id < n2.id AND n1.ad_imgone = n2.ad_imgone AND n1.ad_text = n2.ad_text LIMIT $start,$limit ");
These query can show duplicated row.But this is very slow and increased cup usage to 100% on my server. How to resolve these solution?