如何可视化执行的查询数量以及最小化这些查询以提高系统性能的方法
If you want to know which queries are sent to your db, you can use these two solutions :
If you are looking for what does impact your performances, you can use these two instructions to target the right lines of your code :
$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
Let me know if it helped !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.