sql query taking so much time, need optimization :     SELECT LM.user_id,LM.users_lineup_id, min( LM.total_score ) AS total_score FROM vi_lineup_master LM JOIN vi_contest AS C ON C.contest_unique_id=LM.contest_unique_id join ( SELECT min( total_score ) as total_score FROM vi_lineup_master GROUP BY group_unique_id ) as preq ON LM.total_score = preq.total_score WHERE LM.contest_unique_id = 'iledhSBDO' AND C.league_contest_type=1 GROUP BY group_unique_id

Above query is to find the loser per group of game, query return accurate result but its not responding with large data.Needed optimization please share your solution. Thanks in advance.
