_race
table doesn't have currently. Any ideas? (edited)SELECT * FROM race_points t1 LEFT JOIN (SELECT Name FROM race_race GROUP BY Name) t2 ON t1.Name = t2.Name WHERE t2.Name IS NULL;
SELECT * FROM record_race GROUP BY Name, Map ORDER BY Time ASC;
SELECT * FROM record_points WHERE Name NOT IN (SELECT DISTINCT Name FROM record_race);
might be slower or faster for the second query, idk (edited)SHOW COLUMNS FROM record_race;
SHOW COLUMNS FROM record_points;
SHOW INDEX FROM record_race;
SHOW INDEX FROM record_points;
EXPLAIN SELECT * FROM record_points WHERE Name NOT IN (SELECT DISTINCT Name FROM record_race);
(edited)DELETE t1 FROM race_race t1 LEFT JOIN (SELECT Map, Name, MIN(Time) AS minTime FROM race_race GROUP BY Map, Name) t2 ON t1.Map = t2.Map AND t1.Name = t2.Name AND t1.Time = t2.minTime WHERE t2.Map IS NULL
Can't handle cases where a player has the same time 2 times in the database but that shouldn't happen anyways_race
table ^^