How can I execute SQL queries that take longer 99,999 seconds on MySQL Workbench?

烈酒焚心 提交于 2019-12-05 03:21:54

Probably nobody ever thought you'd need such a high timeout, so you are limited to what is settable currently. But open a feature request on http://bugs.mysql.com to suggest either having 0 disable the timeout entirely or allow bigger values.

Well, in Europe we consider the comma a decimal-separator. Did you actually mean 100k of seconds? I see in your comments that you are handling 50 GB. Even so, if you need longer than an hour, you missed the Indeces. You must know that they won´t get properly rebuildt in a single query, so if you join on a massive insert, You get the cartesian product of rows scanned - in other words, your query could happen to run for weeks or even months.

Solution:

1) Fill in basic data, use no joins here. 2) Alter table to set index. 3) Run "ANALYZE " 4) Do everything else.

If yo feel that you have trouble following that procedure, prepend your Query with the EXPLAIN keyword and post the results.

(I have a cronjob importing about 80GB every 30 minutes in place - MySQL surely can handle this.)

This issue is now solved in MySQL Workbench 6.0.3 (2013-07-09): See the bug report and the change log.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!