想请问一下有没有什么更快的方式使sql查询变快。。。。因为数据量有点大每次都在这个步骤上卡几分钟。。。时间太久了,被怼了,所以请问在数据量打(几千条的样子)面前怎么使这种过滤的速度加快。。。其中(@ids)大概有几千条。。player中的数据就上万条
sqlChannel = Sqls
.create("select player.* from player where playerID in (@ids) and channel = @chnnel");
sqlChannel.setParam("ids", loginIDs.toArray());
sqlChannel.setParam("channel", channel);
sqlChannel.setCallback(Sqls.callback.entities());
sqlChannel.setEntity(logDao.getEntity(T1_PlayerInfo.class));
logDao.execute(sqlChannel);
List<T1_PlayerInfo> channelPlayers = sqlChannel.getList(T1_PlayerInfo.class);