我正在尝试对存储在大型 MySQL 数据库中的数据进行一些分析。我有 2 个表,分别有 1.3 亿和 60 万个条目,我想运行以下查询:
select
hashes.hash,
hashes.hash LIKE 'block%' as block,
min(timestamp) as min,
max(timestamp) as max,
max(timestamp)-min(timestamp) as diff
from
timings left join hashes on (id=timings.hash)
group by
timings.hash
但经过一段随机的时间(1到18分钟之间变化)后,我得到了以下信息:
$ time mysql timings -e "<query>" > diff2.tsv
ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
real 7m34.158s
user 0m0.004s
sys 0m0.000s
日志中根本没有任何消息。有人知道为什么会发生这种情况吗?