1.?...charset=utf-8");3.$con=mysql_connect("localhost","root","123456");4.if!con)5.{ 6.die('Could not connect:'.mysql_error());...100万数据测试中mongo要比mysql至少快2倍。MongoDB要比Mysql有优势。2.测试查询:单条数据操作时间:...
switched to db toto>db toto>2创建100万条数据>for(var i=1;i;i+){.db.c3.insert({name:"zhangsan",age:i});}>db.c3.count();3无索引查找>db.c3.find({age:500000}).explain();4位age字段创建一个索引 db.c3.ensureIndex({age:1});这时候...