0

I use mysql command

mysql -uuser -ppassword -B -e "SELECT SUM(duration) FROM table GROUP BY userId" database > result.tsv &

This is a very slow SQL, I need to use & let SQL execute in the background. which takes about a few hours. But always in the middle of the execution to report a error:

ERROR 1317 (70100) at line 1: Query execution was interrupted
Terminal close -- sending "KILL QUERY 236" to server ...
Terminal close -- query aborted.

I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.

doushichao
  • 23
  • 2
  • 5

0 Answers0