1
我正在使用explain来简单查询以准确知道执行时间。如何使用MongoDB和PHP中的Map Reduce查询的说明
$this->db->toto->find($req)->sort(array('date' => 1))->explain();
我现在想在地图上使用解释并减少查询,怎么做? 我应该使用'经典'分析系统吗?
我想比较这两个查询的执行时间。
例如:
$res = $this->db->command(array(
"mapreduce" => "toto",
"map" => $map,
"reduce" => $reduce,
"finalize" => $finalize,
"query" => $req,
"out" => array("inline"=>1)
))->explain();
不起作用,因为命令返回数组(请说明需要MongoCursor)。
非常感谢你:)