SELECT t1. *, t2 * FROM dungeon_ext t3
The JOIN dungeon_team t2 ON (t2) dungeonId=t3) dungeonId AND t2. CharacterType='healer')
JOIN dungeon t1 ON (t1) dungeonId=t3) dungeonId AND t1. DungeonName='tower of Mr O')
The ORDER BY t3. Score DESC limit 0, 50
Dungeon probably about 300 w lines
Dungeon_team probably about 700 w lines
Then now probably run a secondary 5 minutes,,,,
Excuse me what method to optimize the ~
CodePudding user response:
How many data dungeon_ext table?Explain, see if dungeon_ext driver table, if not, change to the SELECT STRAIGHT_JOIN t1. *, t2. * try
In the key fields and indexes