我正在使用解释进行简单查询,以准确了解执行时间。
    $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)。
非常感谢你:)