如何在MySQL Workbench上执行耗时99,999秒的SQL查询? [英] How can I execute SQL queries that take longer 99,999 seconds on MySQL Workbench?

查看:523
本文介绍了如何在MySQL Workbench上执行耗时99,999秒的SQL查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:问题现已已修复.

我想执行一个查询,该查询的执行时间超过99,999秒(例如SELECT SLEEP(150000);).要更改MySQL Workbench中的超时,我们必须转到编辑→首选项→SQL编辑器→DBMS连接读取超时(以秒为单位).但是,DBMS connection read time out字段最多只能接受5个数字,并且将该字段设置为0等效于默认参数(600秒).如果查询花费的时间超过超时时间,则会收到错误消息:Error Code: 2013. Lost connection to MySQL server during query

I would like to execute a query that takes more than 99,999 seconds to execute (e.g. SELECT SLEEP(150000);). To change the timeout in MySQL Workbench, we have to go to Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds). However, the DBMS connection read time out field only accept up to 5 figures, and setting the field to 0 is equivalent to the default parameter (600 seconds). If the query takes more time than the timeout, I get the error message: Error Code: 2013. Lost connection to MySQL server during query

因此,我的问题是:是否可以将此限制增加到超过99,999秒? 我将Windows 7 64位旗舰版与MySQL Workbench 5.2.47 CE结合使用.

Hence my question: is it possible to increase this limit to over 99,999 seconds? I use Windows 7 64-bit Ultimate with MySQL Workbench 5.2.47 CE.

DBMS connection read time out字段:

超时问题(0等于默认参数(600秒)):

Timeout issue (0 is equivalent to the default parameter (600 seconds)):

推荐答案

可能没有人认为您需要这么高的超时时间,因此您只能使用当前可设置的时间.但是请在 http://bugs.mysql.com 上打开功能请求,以建议将0设置为完全禁用超时或允许更大的值.

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.

这篇关于如何在MySQL Workbench上执行耗时99,999秒的SQL查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆