关于数据库分析器(profiler)
Magento数据库分析器显示页面上执行的所有查询,包括每个查询的时间和什么样的参数被执行。
1: 修改部署配置
修改<Magento 2 安装目录>/app/etc/env.php
将下列代码添加到 magento2/blob/2.0/lib/internal/Magento/Framework/DB/Profiler.php:
'profiler' => [
'class' => '\Magento\Framework\DB\Profiler',
'enabled' => true,
],
示例如下:
'db' =>
array (
'table_prefix' => '',
'connection' =>
array (
'default' =>
array (
'host' =>