相关文章
Git演示平台上的iBoxDB NoSQL与MySQL的性能测试
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;
}