MySQL和PDO测试对比
2010-12-10 19:22:49 来源:WEB开发网核心提示:说明time 发生时间class 类别case 测试用例名称step 用例被执行次数runtime 总的测试时间memory(peak) 消耗的最大内存连接time:2010-07-01 10:53:40, class:pdo, case:connect, step:100000, runtime:21.52, mem
说明
time 发生时间
class 类别
case 测试用例名称
step 用例被执行次数
runtime 总的测试时间
memory(peak) 消耗的最大内存
连接
time:2010-07-01 10:53:40, class:pdo, case:connect, step:100000, runtime:21.52, memory(peak): 262144
time:2010-07-01 10:54:08, class:mysql, case:connect, step:100000, runtime:4.42, memory(peak): 262144
结论:从连接上看PDO的效率会低一些。
插入
time:2010-07-01 10:37:55, class:pdo, case:insert, step:100000, runtime:7.96, memory(peak): 262144
time:2010-07-01 10:38:03, class:mysql, case:insert, step:100000, runtime:7.93, memory(peak): 262144
结论:两者差不多
查询
time:2010-07-01 11:06:41, class:pdo, case:select, step:100000, runtime:10.48, memory(peak): 262144
time:2010-07-01 11:06:54, class:mysql, case:select, step:100000, runtime:10.07, memory(peak): 262144
更多精彩
赞助商链接