使用debugbar可以在浏览器中直接查看执行的sql语句,那么怎么知道这些sql是在哪里调用的呢? 方法: 打开config/debugbar.php,把options.db.backtrace设为true
config/debugbar.php
options.db.backtrace