导致“服务器消失”的简单查询信息

发布于 2024-10-03 03:50:51 字数 343 浏览 1 评论 0原文

刚刚得到一个惊喜,希望得到一些建议。 下面的简单查询更新一个表。我曾多次使用过它,但现在它不能像往常一样工作,导致 MySQL 服务器消失。能承担什么责任。谢谢。

UPDATE rmc_raw_data 
    INNER
    JOIN handover_main
        ON handover_main.handover_time = rmc_raw_data.rmc_time
        AND handover_main.handover_date = rmc_raw_data.rmc_date
        SET rmc_raw_data.handovers = 'Handover'

Have just got a surprise and would appreciate some suggestions.
The simple query below updates a table. I have used it severally without qualms but now it does not work as usual causing the MySQL server to go away. What could be responsible. Thanks.

UPDATE rmc_raw_data 
    INNER
    JOIN handover_main
        ON handover_main.handover_time = rmc_raw_data.rmc_time
        AND handover_main.handover_date = rmc_raw_data.rmc_date
        SET rmc_raw_data.handovers = 'Handover'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜嗑 2024-10-10 03:50:51

建议浏览此处的列表 -他们有非常有用的清单/说明来说明要检查的内容。

它解释了引用消息的最常见和一些不太常见的原因、如何测试它们以及在哪里查找。

通常,在某种程度上它应该与 SQL 无关,而与设置有关。

除了第一个也是最明显的原因(超时)之外,我还会尝试确定通过命令行客户端/脚本运行查询时的行为是否相同,例如与通过 php (和/或您的环境是什么)运行查询相比),也许还有 JDBC/ODBC。

如果行为始终相同,我会专注于服务器设置(使用 mysql 文档)。

It would be advisable to go through the list here - they have quite useful checklist/instructions on what to check.

It explains what are the most common and some of the less common reasons for the quoted message, how to test for them and where to look.

Normally, in a way it should not have anything to do with your SQL but with settings.

Apart from the first and most obvious reason (timeout) I would also try to establish if the behaviour is the same when query is run through command line client/script, compared to for example running it through php (and/or whatever your environment is), JDBC/ODBC perhaps as well.

If behaviour always the same I would concentrate on the server settings (using the mysql docs).

许久 2024-10-10 03:50:51

增加会话的超时时间。它很可能设置为 5 分钟左右,这对于长时间运行的查询来说太短了。

以下是 mysql 文档中的详细信息:
http://dev.mysql.com/doc/refman/5.1 /en/gone-away.html

以下是更改超时选项的详细信息:
http://dev.mysql.com/doc/refman/5.1 /en/mysql-options.html

Increase the timeout of the session. It's most likely set to 5 minutes or so which is too short for long running queries.

Here are the details from the mysql documentation:
http://dev.mysql.com/doc/refman/5.1/en/gone-away.html

Here are the details for changing the timeout options:
http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文