<p>添加索引</p><p>ALTER TABLE `game_game_chart_result` </p><p>ADD UNIQUE INDEX `only_id`(`game_id`, `round`, `today`) USING BTREE;</p><p><br></p><p>删除重复数据</p><p>DELETE FROM game_game_dog_result WHERE id in (SELECT id FROM (SELECT id,game_id,round,today,COUNT(id) as ccc FROM game_game_dog_result GROUP BY game_id,round,today HAVING ccc>1) as onlyid);<br></p>