启动GIT@OSC的演示平台后,点击几次测试后, MySQL都在100ms以上,而 iBoxDB 大部分在50ms附近,花费时间越小,性能越好。

public Integer call() throws Exception {
ResultSet rs = c.createStatement()
executeQuery("select `id`, `value`, `msg` from test");
int l = ;
while (rs.next()) {
if (rs.getString(3).startsWith(
Integer.toString(rs.getInt(1)))){
l += rs.getInt(2);
}
}
return l;
}public Long call() throws Exception {
long l = ;
for (Map<String, Object> map : c.select("from test")) {
if (map.get("msg").toString().startsWith(
map.get("id").toString())) {
l += (Long) map.get("value");
}
}
return l;
}来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69999831/viewspace-3118257/ ,如需转载,请注明出处,否则将追究法律责任。