1
這是一個非常複雜的查詢,所以我在這裏遇到困難。如果你幫助我,我很感激。如何修改此查詢以獲取分頁?
select AvgLevel,TotalCount,tblPokedex.PokemonId,Name,Type1,Type2,Hp,tblPokedex.Attack,tblPokedex.Defense,tblPokedex.SpAttack,tblPokedex.SpDefense,tblPokedex.Speed,(Hp+tblPokedex.Attack+tblPokedex.Defense+tblPokedex.SpAttack+tblPokedex.SpDefense+tblPokedex.Speed) as TotalStats
from tblPokemonStats,tblAvailablePokemons,tblPokedex
left join tblUsersPokemons on tblPokedex.PokemonId=tblUsersPokemons.PokemonId
where tblPokemonStats.PokemonId=tblPokedex.PokemonId
group by tblPokedex.PokemonId,tblPokedex.Name,tblPokedex.Type1,tblPokedex.Type2,tblPokedex.Hp,tblPokedex.Attack,tblPokedex.Defense,tblPokedex.SpAttack,tblPokedex.SpDefense,tblPokedex.Speed,tblPokemonStats.AvgLevel,tblPokemonStats.TotalCount
order by PokemonId asc
好了,所以我想要做的是,例如頂部100和150之間選擇
我該怎麼辦呢?
謝謝讓我試試:) – MonsterMMORPG
好吧,這是工作,但我檢查IO計數,它是非常高的。我不知道會有其他更好的性能解決方案 – MonsterMMORPG
頂部y不會爲我工作 – MonsterMMORPG