I'm trying to do some analysis on data stored in a largish MySQL database. I have 2 tables with 130mio and 600'000 entries respectively and I want to run the following query:
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
but after a random amount of time (varying between 1 and 18 minutes) I get the following:
$ 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
And I get absolutely no message in the log. Any ideas why this might happen?
0 Answers