Memcached和Mysql数据存储测试对比
昨晚写了个关于Memcached和Mysql的数据存储与读取的数据对比,然后让服务器跑了一晚上,一直担心把电脑跑崩溃,还好没有,测试结果和预测的差不多。
测试的平台是Memcached-1.4.13和MySql-14.14;
访问数据库工具是iBatIS+JDBC;
操作系统CentOS6;
CPU:Pentium(R) Dual-Core CPU E5300 @ 2.60GHz双核;
网络环境:本地自环回路;
测试线程100条,每条线程分别进行100次读写,统计平均时间和总时间。
最后的结论是Memcached的单独删除操作平均耗时是5~6ms,单独写操作平均耗时是2~3.5ms,单独读操作平均耗时是1.5~3ms,可见读操作和写操作的耗时基本上是一样的,这跟Memcached内部采用Hash查找算法有关吧,而删除操作是写和读的两倍的原因是删除操作要先查找再写,所以时间消耗是其两倍。
而对Mysql的测试没有做关于delete操作和update操作的统计,只对insert和select操作进行了统计,而且数据表中的操作只有两个键,项越多,数据库越复杂,耗时应该更大。统计结果表明,向空数据表中写100条数据的平均耗时是39ms(一条一条的写,非批量写),向含有10240(10KB)条记录的数据库中读数据的情况为:单独读100条数据的平均耗时为:15ms~25ms,而批量读数据(一次读100条记录)的耗时是50~150ms,平均到每条记录的读取时间是0.5~1.5ms。
心得体会:在进行数据库读数据的时候如果数据比较集中,建议先批量读出来存放到缓冲区,现在很多数据库访问工具都集成了对缓冲区的管理。在进行数据的分散读写操作的时候建议先采用缓冲操作,再进行对数据库的相应操作,使用本地内存缓冲的速度应该比Memcached更快。
下面附录上具体的测试结果,免得以后想用的时候又找不到了,我一向的收拾不好,而且忘性还很大,呵呵。
thread 40: runs: 100 stores of obj 10KB -- avg time per req 3.64 ms (total: 364 ms)
thread 40: runs: 100 gets of obj 10KB -- avg time per req 1.8 ms (total: 180 ms)
thread 41: runs: 100 deletes of obj 10KB -- avg time per req 5.1 ms (total: 510 ms)
thread 41: runs: 100 stores of obj 10KB -- avg time per req 3.33 ms (total: 333 ms)
thread 41: runs: 100 gets of obj 10KB -- avg time per req 2.29 ms (total: 229 ms)
thread 42: runs: 100 deletes of obj 10KB -- avg time per req 5.28 ms (total: 528 ms)
thread 42: runs: 100 stores of obj 10KB -- avg time per req 3.64 ms (total: 364 ms)
thread 42: runs: 100 gets of obj 10KB -- avg time per req 1.83 ms (total: 183 ms)
thread 43: runs: 100 deletes of obj 10KB -- avg time per req 5.65 ms (total: 565 ms)
thread 43: runs: 100 stores of obj 10KB -- avg time per req 3.29 ms (total: 329 ms)
thread 43: runs: 100 gets of obj 10KB -- avg time per req 1.65 ms (total: 165 ms)
thread 44: runs: 100 deletes of obj 10KB -- avg time per req 5.94 ms (total: 594 ms)
thread 44: runs: 100 stores of obj 10KB -- avg time per req 2.98 ms (total: 298 ms)
thread 44: runs: 100 gets of obj 10KB -- avg time per req 1.65 ms (total: 165 ms)
thread 45: runs: 100 deletes of obj 10KB -- avg time per req 5.42 ms (total: 542 ms)
thread 45: runs: 100 stores of obj 10KB -- avg time per req 2.93 ms (total: 293 ms)
thread 45: runs: 100 gets of obj 10KB -- avg time per req 1.8 ms (total: 180 ms)
thread 46: runs: 100 deletes of obj 10KB -- avg time per req 6.05 ms (total: 605 ms)
thread 46: runs: 100 stores of obj 10KB -- avg time per req 3.43 ms (total: 343 ms)
thread 46: runs: 100 gets of obj 10KB -- avg time per req 1.38 ms (total: 138 ms)
thread 47: runs: 100 deletes of obj 10KB -- avg time per req 5.36 ms (total: 536 ms)
thread 47: runs: 100 stores of obj 10KB -- avg time per req 3.06 ms (total: 306 ms)
thread 47: runs: 100 gets of obj 10KB -- avg time per req 2.22 ms (total: 222 ms)
thread 48: runs: 100 deletes of obj 10KB -- avg time per req 6.29 ms (total: 629 ms)
thread 48: runs: 100 stores of obj 10KB -- avg time per req 2.62 ms (total: 262 ms)
thread 48: runs: 100 gets of obj 10KB -- avg time per req 1.62 ms (total: 162 ms)
thread 49: runs: 100 deletes of obj 10KB -- avg time per req 4.09 ms (total: 409 ms)
thread 49: runs: 100 stores of obj 10KB -- avg time per req 3.34 ms (total: 334 ms)
thread 49: runs: 100 gets of obj 10KB -- avg time per req 2.62 ms (total: 262 ms)
thread 50: runs: 100 deletes of obj 10KB -- avg time per req 5.56 ms (total: 556 ms)
thread 50: runs: 100 stores of obj 10KB -- avg time per req 3.2 ms (total: 320 ms)
thread 50: runs: 100 gets of obj 10KB -- avg time per req 2.02 ms (total: 202 ms)
thread 51: runs: 100 deletes of obj 10KB -- avg time per req 6.26 ms (total: 626 ms)
thread 51: runs: 100 stores of obj 10KB -- avg time per req 2.66 ms (total: 266 ms)
thread 51: runs: 100 gets of obj 10KB -- avg time per req 1.9 ms (total: 190 ms)
thread 52: runs: 100 deletes of obj 10KB -- avg time per req 4.5 ms (total: 450 ms)
thread 52: runs: 100 stores of obj 10KB -- avg time per req 3.81 ms (total: 381 ms)
thread 52: runs: 100 gets of obj 10KB -- avg time per req 1.82 ms (total: 182 ms)
thread 53: runs: 100 deletes of obj 10KB -- avg time per req 6.0 ms (total: 600 ms)
thread 53: runs: 100 stores of obj 10KB -- avg time per req 3.57 ms (total: 357 ms)
thread 53: runs: 100 gets of obj 10KB -- avg time per req 1.25 ms (total: 125 ms)
thread 54: runs: 100 deletes of obj 10KB -- avg time per req 5.48 ms (total: 548 ms)
thread 54: runs: 100 stores of obj 10KB -- avg time per req 3.06 ms (total: 306 ms)
thread 54: runs: 100 gets of obj 10KB -- avg time per req 2.24 ms (total: 224 ms)
thread 55: runs: 100 deletes of obj 10KB -- avg time per req 3.97 ms (total: 397 ms)
thread 55: runs: 100 stores of obj 10KB -- avg time per req 3.39 ms (total: 339 ms)
thread 55: runs: 100 gets of obj 10KB -- avg time per req 2.45 ms (total: 245 ms)
thread 56: runs: 100 deletes of obj 10KB -- avg time per req 6.06 ms (total: 606 ms)
thread 56: runs: 100 stores of obj 10KB -- avg time per req 3.68 ms (total: 368 ms)
thread 56: runs: 100 gets of obj 10KB -- avg time per req 1.15 ms (total: 115 ms)
thread 57: runs: 100 deletes of obj 10KB -- avg time per req 5.1 ms (total: 510 ms)
thread 57: runs: 100 stores of obj 10KB -- avg time per req 2.88 ms (total: 288 ms)
thread 57: runs: 100 gets of obj 10KB -- avg time per req 2.19 ms (total: 219 ms)
thread 58: runs: 100 deletes of obj 10KB -- avg time per req 6.19 ms (total: 619 ms)
thread 58: runs: 100 stores of obj 10KB -- avg time per req 2.7 ms (total: 270 ms)
thread 58: runs: 100 gets of obj 10KB -- avg time per req 1.79 ms (total: 179 ms)
thread 59: runs: 100 deletes of obj 10KB -- avg time per req 6.18 ms (total: 618 ms)
thread 59: runs: 100 stores of obj 10KB -- avg time per req 3.51 ms (total: 351 ms)
thread 59: runs: 100 gets of obj 10KB -- avg time per req 1.08 ms (total: 108 ms)
thread 60: runs: 100 deletes of obj 10KB -- avg time per req 5.0 ms (total: 500 ms)
thread 60: runs: 100 stores of obj 10KB -- avg time per req 2.91 ms (total: 291 ms)
thread 60: runs: 100 gets of obj 10KB -- avg time per req 2.35 ms (total: 235 ms)
thread 61: runs: 100 deletes of obj 10KB -- avg time per req 6.26 ms (total: 626 ms)
thread 61: runs: 100 stores of obj 10KB -- avg time per req 3.05 ms (total: 305 ms)
thread 61: runs: 100 gets of obj 10KB -- avg time per req 1.49 ms (total: 149 ms)
thread 62: runs: 100 deletes of obj 10KB -- avg time per req 5.93 ms (total: 593 ms)
thread 62: runs: 100 stores of obj 10KB -- avg time per req 3.52 ms (total: 352 ms)
thread 62: runs: 100 gets of obj 10KB -- avg time per req 1.38 ms (total: 138 ms)
thread 63: runs: 100 deletes of obj 10KB -- avg time per req 6.24 ms (total: 624 ms)
thread 63: runs: 100 stores of obj 10KB -- avg time per req 2.62 ms (total: 262 ms)
thread 63: runs: 100 gets of obj 10KB -- avg time per req 1.64 ms (total: 164 ms)
thread 64: runs: 100 deletes of obj 10KB -- avg time per req 4.26 ms (total: 426 ms)
thread 64: runs: 100 stores of obj 10KB -- avg time per req 2.68 ms (total: 268 ms)
thread 64: runs: 100 gets of obj 10KB -- avg time per req 2.63 ms (total: 263 ms)
thread 65: runs: 100 deletes of obj 10KB -- avg time per req 5.6 ms (total: 560 ms)
thread 65: runs: 100 stores of obj 10KB -- avg time per req 3.27 ms (total: 327 ms)
thread 65: runs: 100 gets of obj 10KB -- avg time per req 1.82 ms (total: 182 ms)
thread 66: runs: 100 deletes of obj 10KB -- avg time per req 5.97 ms (total: 597 ms)
thread 66: runs: 100 stores of obj 10KB -- avg time per req 3.36 ms (total: 336 ms)
thread 66: runs: 100 gets of obj 10KB -- avg time per req 1.43 ms (total: 143 ms)
thread 67: runs: 100 deletes of obj 10KB -- avg time per req 6.07 ms (total: 607 ms)
thread 67: runs: 100 stores of obj 10KB -- avg time per req 3.43 ms (total: 343 ms)
thread 67: runs: 100 gets of obj 10KB -- avg time per req 1.27 ms (total: 127 ms)
thread 68: runs: 100 deletes of obj 10KB -- avg time per req 5.67 ms (total: 567 ms)
thread 68: runs: 100 stores of obj 10KB -- avg time per req 2.66 ms (total: 266 ms)
thread 68: runs: 100 gets of obj 10KB -- avg time per req 2.25 ms (total: 225 ms)
thread 69: runs: 100 deletes of obj 10KB -- avg time per req 5.6 ms (total: 560 ms)
thread 69: runs: 100 stores of obj 10KB -- avg time per req 3.13 ms (total: 313 ms)
thread 69: runs: 100 gets of obj 10KB -- avg time per req 1.94 ms (total: 194 ms)
thread 70: runs: 100 deletes of obj 10KB -- avg time per req 5.71 ms (total: 571 ms)
thread 70: runs: 100 stores of obj 10KB -- avg time per req 3.6 ms (total: 360 ms)
thread 70: runs: 100 gets of obj 10KB -- avg time per req 1.48 ms (total: 148 ms)
thread 71: runs: 100 deletes of obj 10KB -- avg time per req 6.01 ms (total: 601 ms)
thread 71: runs: 100 stores of obj 10KB -- avg time per req 2.61 ms (total: 261 ms)
thread 71: runs: 100 gets of obj 10KB -- avg time per req 1.66 ms (total: 166 ms)
thread 72: runs: 100 deletes of obj 10KB -- avg time per req 5.53 ms (total: 553 ms)
thread 72: runs: 100 stores of obj 10KB -- avg time per req 2.96 ms (total: 296 ms)
thread 72: runs: 100 gets of obj 10KB -- avg time per req 1.99 ms (total: 199 ms)
thread 73: runs: 100 deletes of obj 10KB -- avg time per req 5.69 ms (total: 569 ms)
thread 73: runs: 100 stores of obj 10KB -- avg time per req 2.57 ms (total: 257 ms)
thread 73: runs: 100 gets of obj 10KB -- avg time per req 2.27 ms (total: 227 ms)
thread 74: runs: 100 deletes of obj 10KB -- avg time per req 4.92 ms (total: 492 ms)
thread 74: runs: 100 stores of obj 10KB -- avg time per req 3.18 ms (total: 318 ms)
thread 74: runs: 100 gets of obj 10KB -- avg time per req 1.85 ms (total: 185 ms)
thread 75: runs: 100 deletes of obj 10KB -- avg time per req 5.57 ms (total: 557 ms)
thread 75: runs: 100 stores of obj 10KB -- avg time per req 2.68 ms (total: 268 ms)
thread 75: runs: 100 gets of obj 10KB -- avg time per req 2.14 ms (total: 214 ms)
thread 76: runs: 100 deletes of obj 10KB -- avg time per req 5.3 ms (total: 530 ms)
thread 76: runs: 100 stores of obj 10KB -- avg time per req 2.94 ms (total: 294 ms)
thread 76: runs: 100 gets of obj 10KB -- avg time per req 2.02 ms (total: 202 ms)
thread 77: runs: 100 deletes of obj 10KB -- avg time per req 4.81 ms (total: 481 ms)
thread 77: runs: 100 stores of obj 10KB -- avg time per req 2.74 ms (total: 274 ms)
thread 77: runs: 100 gets of obj 10KB -- avg time per req 2.7 ms (total: 270 ms)
thread 78: runs: 100 deletes of obj 10KB -- avg time per req 4.38 ms (total: 438 ms)
thread 78: runs: 100 stores of obj 10KB -- avg time per req 3.52 ms (total: 352 ms)
thread 78: runs: 100 gets of obj 10KB -- avg time per req 2.43 ms (total: 243 ms)
thread 79: runs: 100 deletes of obj 10KB -- avg time per req 5.69 ms (total: 569 ms)
thread 79: runs: 100 stores of obj 10KB -- avg time per req 2.54 ms (total: 254 ms)
thread 79: runs: 100 gets of obj 10KB -- avg time per req 2.34 ms (total: 234 ms)
thread 80: runs: 100 deletes of obj 10KB -- avg time per req 4.19 ms (total: 419 ms)
thread 80: runs: 100 stores of obj 10KB -- avg time per req 3.02 ms (total: 302 ms)
thread 80: runs: 100 gets of obj 10KB -- avg time per req 2.91 ms (total: 291 ms)
thread 81: runs: 100 deletes of obj 10KB -- avg time per req 6.16 ms (total: 616 ms)
thread 81: runs: 100 stores of obj 10KB -- avg time per req 3.41 ms (total: 341 ms)
thread 81: runs: 100 gets of obj 10KB -- avg time per req 1.16 ms (total: 116 ms)
thread 82: runs: 100 deletes of obj 10KB -- avg time per req 5.55 ms (total: 555 ms)
thread 82: runs: 100 stores of obj 10KB -- avg time per req 3.45 ms (total: 345 ms)
thread 82: runs: 100 gets of obj 10KB -- avg time per req 1.53 ms (total: 153 ms)
thread 83: runs: 100 deletes of obj 10KB -- avg time per req 5.92 ms (total: 592 ms)
thread 83: runs: 100 stores of obj 10KB -- avg time per req 2.73 ms (total: 273 ms)
thread 83: runs: 100 gets of obj 10KB -- avg time per req 1.85 ms (total: 185 ms)
thread 84: runs: 100 deletes of obj 10KB -- avg time per req 5.69 ms (total: 569 ms)
thread 84: runs: 100 stores of obj 10KB -- avg time per req 3.51 ms (total: 351 ms)
thread 84: runs: 100 gets of obj 10KB -- avg time per req 1.49 ms (total: 149 ms)
thread 85: runs: 100 deletes of obj 10KB -- avg time per req 4.75 ms (total: 475 ms)
thread 85: runs: 100 stores of obj 10KB -- avg time per req 2.87 ms (total: 287 ms)
thread 85: runs: 100 gets of obj 10KB -- avg time per req 2.8 ms (total: 280 ms)
thread 86: runs: 100 deletes of obj 10KB -- avg time per req 5.74 ms (total: 574 ms)
thread 86: runs: 100 stores of obj 10KB -- avg time per req 2.92 ms (total: 292 ms)
thread 86: runs: 100 gets of obj 10KB -- avg time per req 1.88 ms (total: 188 ms)
thread 87: runs: 100 deletes of obj 10KB -- avg time per req 5.61 ms (total: 561 ms)
thread 87: runs: 100 stores of obj 10KB -- avg time per req 3.11 ms (total: 311 ms)
thread 87: runs: 100 gets of obj 10KB -- avg time per req 1.84 ms (total: 184 ms)
thread 88: runs: 100 deletes of obj 10KB -- avg time per req 5.52 ms (total: 552 ms)
thread 88: runs: 100 stores of obj 10KB -- avg time per req 3.6 ms (total: 360 ms)
thread 88: runs: 100 gets of obj 10KB -- avg time per req 1.46 ms (total: 146 ms)
thread 89: runs: 100 deletes of obj 10KB -- avg time per req 6.68 ms (total: 668 ms)
thread 89: runs: 100 stores of obj 10KB -- avg time per req 3.01 ms (total: 301 ms)
thread 89: runs: 100 gets of obj 10KB -- avg time per req 0.95 ms (total: 95 ms)
thread 90: runs: 100 deletes of obj 10KB -- avg time per req 6.35 ms (total: 635 ms)
thread 90: runs: 100 stores of obj 10KB -- avg time per req 2.69 ms (total: 269 ms)
thread 90: runs: 100 gets of obj 10KB -- avg time per req 1.48 ms (total: 148 ms)
thread 91: runs: 100 deletes of obj 10KB -- avg time per req 5.97 ms (total: 597 ms)
thread 91: runs: 100 stores of obj 10KB -- avg time per req 2.69 ms (total: 269 ms)
thread 91: runs: 100 gets of obj 10KB -- avg time per req 1.69 ms (total: 169 ms)
thread 92: runs: 100 deletes of obj 10KB -- avg time per req 5.7 ms (total: 570 ms)
thread 92: runs: 100 stores of obj 10KB -- avg time per req 3.31 ms (total: 331 ms)
thread 92: runs: 100 gets of obj 10KB -- avg time per req 1.58 ms (total: 158 ms)
thread 93: runs: 100 deletes of obj 10KB -- avg time per req 4.51 ms (total: 451 ms)
thread 93: runs: 100 stores of obj 10KB -- avg time per req 3.5 ms (total: 350 ms)
thread 93: runs: 100 gets of obj 10KB -- avg time per req 2.21 ms (total: 221 ms)
thread 94: runs: 100 deletes of obj 10KB -- avg time per req 3.65 ms (total: 365 ms)
thread 94: runs: 100 stores of obj 10KB -- avg time per req 3.15 ms (total: 315 ms)
thread 94: runs: 100 gets of obj 10KB -- avg time per req 2.58 ms (total: 258 ms)
thread 95: runs: 100 deletes of obj 10KB -- avg time per req 5.19 ms (total: 519 ms)
thread 95: runs: 100 stores of obj 10KB -- avg time per req 3.28 ms (total: 328 ms)
thread 95: runs: 100 gets of obj 10KB -- avg time per req 2.14 ms (total: 214 ms)
thread 96: runs: 100 deletes of obj 10KB -- avg time per req 5.55 ms (total: 555 ms)
thread 96: runs: 100 stores of obj 10KB -- avg time per req 3.03 ms (total: 303 ms)
thread 96: runs: 100 gets of obj 10KB -- avg time per req 1.84 ms (total: 184 ms)
thread 97: runs: 100 deletes of obj 10KB -- avg time per req 5.36 ms (total: 536 ms)
thread 97: runs: 100 stores of obj 10KB -- avg time per req 3.35 ms (total: 335 ms)
thread 97: runs: 100 gets of obj 10KB -- avg time per req 1.16 ms (total: 116 ms)
thread 98: runs: 100 deletes of obj 10KB -- avg time per req 4.52 ms (total: 452 ms)
thread 98: runs: 100 stores of obj 10KB -- avg time per req 3.01 ms (total: 301 ms)
thread 98: runs: 100 gets of obj 10KB -- avg time per req 2.1 ms (total: 210 ms)
thread 99: runs: 100 deletes of obj 10KB -- avg time per req 4.71 ms (total: 471 ms)
thread 99: runs: 100 stores of obj 10KB -- avg time per req 2.65 ms (total: 265 ms)
thread 99: runs: 100 gets of obj 10KB -- avg time per req 2.04 ms (total: 204 ms)
thread 0:runs: 100write in database, --avg time per req 38.96 ms (total: 3896ms)
thread 0:runs:100read one by one in database, --avg time per req 23.34ms(total:2334ms)
thread 0:runs:100read list in database, --avg time per req 0.04ms(total:4ms)
thread 1:runs:100read one by one in database, --avg time per req 18.89ms(total:1889ms)
thread 1:runs:100read list in database, --avg time per req 0.85ms(total:85ms)
thread 2:runs:100read one by one in database, --avg time per req 16.68ms(total:1668ms)
thread 2:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 3:runs:100read one by one in database, --avg time per req 23.41ms(total:2341ms)
thread 3:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 4:runs:100read one by one in database, --avg time per req 17.46ms(total:1746ms)
thread 4:runs:100read list in database, --avg time per req 0.13ms(total:13ms)
thread 5:runs:100read one by one in database, --avg time per req 24.04ms(total:2404ms)
thread 5:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 6:runs:100read one by one in database, --avg time per req 23.41ms(total:2341ms)
thread 6:runs:100read list in database, --avg time per req 0.09ms(total:9ms)
thread 7:runs:100read one by one in database, --avg time per req 21.28ms(total:2128ms)
thread 7:runs:100read list in database, --avg time per req 0.11ms(total:11ms)
thread 8:runs:100read one by one in database, --avg time per req 21.55ms(total:2155ms)
thread 8:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 9:runs:100read one by one in database, --avg time per req 21.64ms(total:2164ms)
thread 9:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 10:runs:100read one by one in database, --avg time per req 15.62ms(total:1562ms)
thread 10:runs:100read list in database, --avg time per req 1.75ms(total:175ms)
thread 11:runs:100read one by one in database, --avg time per req 20.36ms(total:2036ms)
thread 11:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 12:runs:100read one by one in database, --avg time per req 19.84ms(total:1984ms)
thread 12:runs:100read list in database, --avg time per req 0.08ms(total:8ms)
thread 13:runs:100read one by one in database, --avg time per req 20.67ms(total:2067ms)
thread 13:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 14:runs:100read one by one in database, --avg time per req 21.98ms(total:2198ms)
thread 14:runs:100read list in database, --avg time per req 0.31ms(total:31ms)
thread 15:runs:100read one by one in database, --avg time per req 24.13ms(total:2413ms)
thread 15:runs:100read list in database, --avg time per req 0.0ms(total:0ms)
thread 16:runs:100read one by one in database, --avg time per req 19.68ms(total:1968ms)
thread 16:runs:100read list in database, --avg time per req 0.74ms(total:74ms)
thread 17:runs:100read one by one in database, --avg time per req 19.67ms(total:1967ms)
thread 17:runs:100read list in database, --avg time per req 0.46ms(total:46ms)
thread 18:runs:100read one by one in database, --avg time per req 17.15ms(total:1715ms)
thread 18:runs:100read list in database, --avg time per req 1.11ms(total:111ms)
thread 19:runs:100read one by one in database, --avg time per req 21.25ms(total:2125ms)
thread 19:runs:100read list in database, --avg time per req 0.33ms(total:33ms)
thread 20:runs:100read one by one in database, --avg time per req 22.58ms(total:2258ms)
thread 20:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 21:runs:100read one by one in database, --avg time per req 24.1ms(total:2410ms)
thread 21:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 22:runs:100read one by one in database, --avg time per req 21.6ms(total:2160ms)
thread 22:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 23:runs:100read one by one in database, --avg time per req 17.55ms(total:1755ms)
thread 23:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 24:runs:100read one by one in database, --avg time per req 20.24ms(total:2024ms)
thread 24:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 25:runs:100read one by one in database, --avg time per req 20.53ms(total:2053ms)
thread 25:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 26:runs:100read one by one in database, --avg time per req 23.93ms(total:2393ms)
thread 26:runs:100read list in database, --avg time per req 0.14ms(total:14ms)
thread 27:runs:100read one by one in database, --avg time per req 24.1ms(total:2410ms)
thread 27:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 28:runs:100read one by one in database, --avg time per req 12.79ms(total:1279ms)
thread 28:runs:100read list in database, --avg time per req 6.64ms(total:664ms)
thread 29:runs:100read one by one in database, --avg time per req 23.62ms(total:2362ms)
thread 29:runs:100read list in database, --avg time per req 0.04ms(total:4ms)
thread 30:runs:100read one by one in database, --avg time per req 19.88ms(total:1988ms)
thread 30:runs:100read list in database, --avg time per req 1.56ms(total:156ms)
thread 31:runs:100read one by one in database, --avg time per req 20.48ms(total:2048ms)
thread 31:runs:100read list in database, --avg time per req 0.28ms(total:28ms)
thread 32:runs:100read one by one in database, --avg time per req 21.78ms(total:2178ms)
thread 32:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 33:runs:100read one by one in database, --avg time per req 17.85ms(total:1785ms)
thread 33:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 34:runs:100read one by one in database, --avg time per req 23.43ms(total:2343ms)
thread 34:runs:100read list in database, --avg time per req 0.04ms(total:4ms)
thread 35:runs:100read one by one in database, --avg time per req 22.4ms(total:2240ms)
thread 35:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 36:runs:100read one by one in database, --avg time per req 23.19ms(total:2319ms)
thread 36:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 37:runs:100read one by one in database, --avg time per req 23.69ms(total:2369ms)
thread 37:runs:100read list in database, --avg time per req 0.03ms(total:3ms)
thread 38:runs:100read one by one in database, --avg time per req 22.21ms(total:2221ms)
thread 38:runs:100read list in database, --avg time per req 0.31ms(total:31ms)
thread 39:runs:100read one by one in database, --avg time per req 16.55ms(total:1655ms)
thread 39:runs:100read list in database, --avg time per req 0.1ms(total:10ms)
thread 40:runs:100read one by one in database, --avg time per req 21.33ms(total:2133ms)
thread 40:runs:100read list in database, --avg time per req 0.36ms(total:36ms)
thread 41:runs:100read one by one in database, --avg time per req 19.48ms(total:1948ms)
thread 41:runs:100read list in database, --avg time per req 0.04ms(total:4ms)
thread 42:runs:100read one by one in database, --avg time per req 16.63ms(total:1663ms)
thread 42:runs:100read list in database, --avg time per req 0.09ms(total:9ms)
thread 43:runs:100read one by one in database, --avg time per req 22.06ms(total:2206ms)
thread 43:runs:100read list in database, --avg time per req 0.17ms(total:17ms)
thread 44:runs:100read one by one in database, --avg time per req 19.94ms(total:1994ms)
thread 44:runs:100read list in database, --avg time per req 1.61ms(total:161ms)
thread 45:runs:100read one by one in database, --avg time per req 23.9ms(total:2390ms)
thread 45:runs:100read list in database, --avg time per req 0.12ms(total:12ms)
thread 46:runs:100read one by one in database, --avg time per req 23.96ms(total:2396ms)
thread 46:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 47:runs:100read one by one in database, --avg time per req 23.6ms(total:2360ms)
thread 47:runs:100read list in database, --avg time per req 0.03ms(total:3ms)
thread 48:runs:100read one by one in database, --avg time per req 23.48ms(total:2348ms)
thread 48:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 49:runs:100read one by one in database, --avg time per req 23.03ms(total:2303ms)
thread 49:runs:100read list in database, --avg time per req 0.26ms(total:26ms)
thread 50:runs:100read one by one in database, --avg time per req 20.86ms(total:2086ms)
thread 50:runs:100read list in database, --avg time per req 0.14ms(total:14ms)
thread 51:runs:100read one by one in database, --avg time per req 19.76ms(total:1976ms)
thread 51:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 52:runs:100read one by one in database, --avg time per req 22.56ms(total:2256ms)
thread 52:runs:100read list in database, --avg time per req 0.09ms(total:9ms)
thread 53:runs:100read one by one in database, --avg time per req 15.47ms(total:1547ms)
thread 53:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 54:runs:100read one by one in database, --avg time per req 23.0ms(total:2300ms)
thread 54:runs:100read list in database, --avg time per req 0.13ms(total:13ms)
thread 55:runs:100read one by one in database, --avg time per req 23.35ms(total:2335ms)
thread 55:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 56:runs:100read one by one in database, --avg time per req 23.29ms(total:2329ms)
thread 56:runs:100read list in database, --avg time per req 0.13ms(total:13ms)
thread 57:runs:100read one by one in database, --avg time per req 19.88ms(total:1988ms)
thread 57:runs:100read list in database, --avg time per req 0.48ms(total:48ms)
thread 58:runs:100read one by one in database, --avg time per req 18.75ms(total:1875ms)
thread 58:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 59:runs:100read one by one in database, --avg time per req 23.91ms(total:2391ms)
thread 59:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 60:runs:100read one by one in database, --avg time per req 15.15ms(total:1515ms)
thread 60:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 61:runs:100read one by one in database, --avg time per req 23.39ms(total:2339ms)
thread 61:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 62:runs:100read one by one in database, --avg time per req 19.3ms(total:1930ms)
thread 62:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 63:runs:100read one by one in database, --avg time per req 23.7ms(total:2370ms)
thread 63:runs:100read list in database, --avg time per req 0.09ms(total:9ms)
thread 64:runs:100read one by one in database, --avg time per req 18.97ms(total:1897ms)
thread 64:runs:100read list in database, --avg time per req 0.93ms(total:93ms)
thread 65:runs:100read one by one in database, --avg time per req 23.57ms(total:2357ms)
thread 65:runs:100read list in database, --avg time per req 0.1ms(total:10ms)
thread 66:runs:100read one by one in database, --avg time per req 23.57ms(total:2357ms)
thread 66:runs:100read list in database, --avg time per req 0.03ms(total:3ms)
thread 67:runs:100read one by one in database, --avg time per req 18.78ms(total:1878ms)
thread 67:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 68:runs:100read one by one in database, --avg time per req 20.84ms(total:2084ms)
thread 68:runs:100read list in database, --avg time per req 1.35ms(total:135ms)
thread 69:runs:100read one by one in database, --avg time per req 23.21ms(total:2321ms)
thread 69:runs:100read list in database, --avg time per req 0.16ms(total:16ms)
thread 70:runs:100read one by one in database, --avg time per req 20.27ms(total:2027ms)
thread 70:runs:100read list in database, --avg time per req 0.25ms(total:25ms)
thread 71:runs:100read one by one in database, --avg time per req 24.17ms(total:2417ms)
thread 71:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 72:runs:100read one by one in database, --avg time per req 15.39ms(total:1539ms)
thread 72:runs:100read list in database, --avg time per req 0.21ms(total:21ms)
thread 73:runs:100read one by one in database, --avg time per req 13.67ms(total:1367ms)
thread 73:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 74:runs:100read one by one in database, --avg time per req 22.08ms(total:2208ms)
thread 74:runs:100read list in database, --avg time per req 0.09ms(total:9ms)
thread 75:runs:100read one by one in database, --avg time per req 17.4ms(total:1740ms)
thread 75:runs:100read list in database, --avg time per req 0.91ms(total:91ms)
thread 76:runs:100read one by one in database, --avg time per req 15.5ms(total:1550ms)
thread 76:runs:100read list in database, --avg time per req 0.87ms(total:87ms)
thread 77:runs:100read one by one in database, --avg time per req 16.79ms(total:1679ms)
thread 77:runs:100read list in database, --avg time per req 1.81ms(total:181ms)
thread 78:runs:100read one by one in database, --avg time per req 24.07ms(total:2407ms)
thread 78:runs:100read list in database, --avg time per req 0.02ms(total:2ms)
thread 79:runs:100read one by one in database, --avg time per req 22.74ms(total:2274ms)
thread 79:runs:100read list in database, --avg time per req 0.15ms(total:15ms)
thread 80:runs:100read one by one in database, --avg time per req 22.04ms(total:2204ms)
thread 80:runs:100read list in database, --avg time per req 0.16ms(total:16ms)
thread 81:runs:100read one by one in database, --avg time per req 21.29ms(total:2129ms)
thread 81:runs:100read list in database, --avg time per req 0.29ms(total:29ms)
thread 82:runs:100read one by one in database, --avg time per req 18.44ms(total:1844ms)
thread 82:runs:100read list in database, --avg time per req 1.37ms(total:137ms)
thread 83:runs:100read one by one in database, --avg time per req 21.19ms(total:2119ms)
thread 83:runs:100read list in database, --avg time per req 1.19ms(total:119ms)
thread 84:runs:100read one by one in database, --avg time per req 19.84ms(total:1984ms)
thread 84:runs:100read list in database, --avg time per req 2.25ms(total:225ms)
thread 85:runs:100read one by one in database, --avg time per req 21.33ms(total:2133ms)
thread 85:runs:100read list in database, --avg time per req 0.17ms(total:17ms)
thread 86:runs:100read one by one in database, --avg time per req 23.41ms(total:2341ms)
thread 86:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 87:runs:100read one by one in database, --avg time per req 15.06ms(total:1506ms)
thread 87:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 88:runs:100read one by one in database, --avg time per req 21.8ms(total:2180ms)
thread 88:runs:100read list in database, --avg time per req 0.08ms(total:8ms)
thread 89:runs:100read one by one in database, --avg time per req 15.83ms(total:1583ms)
thread 89:runs:100read list in database, --avg time per req 3.44ms(total:344ms)
thread 90:runs:100read one by one in database, --avg time per req 23.61ms(total:2361ms)
thread 90:runs:100read list in database, --avg time per req 0.03ms(total:3ms)
thread 91:runs:100read one by one in database, --avg time per req 24.04ms(total:2404ms)
thread 91:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 92:runs:100read one by one in database, --avg time per req 20.73ms(total:2073ms)
thread 92:runs:100read list in database, --avg time per req 0.07ms(total:7ms)
thread 93:runs:100read one by one in database, --avg time per req 10.77ms(total:1077ms)
thread 93:runs:100read list in database, --avg time per req 0.2ms(total:20ms)
thread 94:runs:100read one by one in database, --avg time per req 18.71ms(total:1871ms)
thread 94:runs:100read list in database, --avg time per req 0.06ms(total:6ms)
thread 95:runs:100read one by one in database, --avg time per req 21.46ms(total:2146ms)
thread 95:runs:100read list in database, --avg time per req 0.74ms(total:74ms)
thread 96:runs:100read one by one in database, --avg time per req 23.85ms(total:2385ms)
thread 96:runs:100read list in database, --avg time per req 0.01ms(total:1ms)
thread 97:runs:100read one by one in database, --avg time per req 22.73ms(total:2273ms)
thread 97:runs:100read list in database, --avg time per req 0.25ms(total:25ms)
thread 98:runs:100read one by one in database, --avg time per req 21.11ms(total:2111ms)
thread 98:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
thread 99:runs:100read one by one in database, --avg time per req 23.2ms(total:2320ms)
thread 99:runs:100read list in database, --avg time per req 0.05ms(total:5ms)
--转自