每条sql执行的时间查看

 $query) {
        // 处理方法参考http://stackoverflow.com/a/25183270/1373875
        $sql = $query['query'];
        foreach ($query['bindings'] as $val) {
        $sq = preg_replace('/\?/',"'{$val}'", $sql, 1);
    }

    $time += $query['time'];
    \Log::info('['.  ($key+1)  .']  ' . $sql . '  ['.$query['time']  . 'ms]');
    \Log::info('total time ' . $time . 'ms');
}

你可能感兴趣的:(每条sql执行的时间查看)