【发布时间】:2019-05-29 09:06:33
【问题描述】:
有很多问题与我的主题相同,但我的内容和问题似乎不同。在我的工作台中,我运行代码
`select(msgid) from `table`.log where
id = 'example' and status = 'active' and month(created_at) = 12
and year(created_at) = 2018 limit 0,10;`
上面的代码工作正常,但是当我运行代码b时
`select(msgid), count(msgid) from `table`.log where
id = 'example' and status = 'active' and month(created_at) = 12
and year(created_at) = 2018 limit 0,10;`
我得到了错误
> 错误代码:2013。在查询 30.002 秒期间失去与 MySQL 服务器的连接
为什么我的工作台会发生这种情况?
PS:workbench 和 mysql 新手
【问题讨论】:
-
为什么你的查询这么慢?您可能希望专注于提高速度。
标签: php mysql mysql-workbench