最近,我们的 Laravel 查询日志变得明显更大。每天约为 50-100mb,一天后增加到约 1-1.5gb。
有很多对jobs表的查询,像这样
[05.08.2020 00:00:02] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574802, 1596571202]
[05.08.2020 00:00:05] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574805, 1596571205]
[05.08.2020 00:00:09] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574809, 1596571209]
[05.08.2020 00:00:12] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574812, 1596571212]
[05.08.2020 00:00:15] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574815, 1596571215]
[05.08.2020 00:00:18] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574818, 1596571218]
[05.08.2020 00:00:21] select * from `jobs` where `queue` = ? and ((`reserved_at` is null and `available_at` <= ?) or (`reserved_at` <= ?)) order by `id` asc limit 1 for update [default, 1596574821, 1596571221]
他们整天都在这样询问。
我怎样才能减少这个金额?或者有那么多疑问可以吗jobs?
郎朗坤