[英]How can i handle and limit the number of the query executed on the laravel project?
如何可视化执行的查询数量以及最小化这些查询以提高系统性能的方法
如果您想知道将哪些查询发送到您的数据库,您可以使用以下两种解决方案:
如果您正在寻找什么会影响您的性能,您可以使用这两条指令来定位代码的正确行:
$time = microtime(true); // we save the precise time in milliseconds
// some lines of code
dd(microtime(true) - $time); // prints the milliseconds spent since $time was saved
如果有帮助,请告诉我!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.