应用程序在jdbcTemplate中随机挂起以进行更新 [英] Application hangs up randomly in jdbcTemplate for update

查看:73
本文介绍了应用程序在jdbcTemplate中随机挂起以进行更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Spring的simpleJdbcTemplate来执行如下所示的查询更新:

I am using simpleJdbcTemplate of Spring to execute update with query shown below:

update TABLE B JOIN 
(select Column1 from TABLE A
) C ON B.Column2 = C.Column3
set B.Column4 = 1

交易超时.

有什么建议吗?

推荐答案

如果SQL执行正在挂起,则说明数据库正在执行尝试执行的工作量减少,或者对所需的表具有隔离锁,导致通过从其他地方到数据库的另一种连接.

If the SQL execution is hanging, then either the database is doing a shedload of work trying to execute it, or you have a isolation lock on the required tables caused by another connection to the database from elsewhere.

这几乎可以肯定与Spring无关,但是如果没有更多信息,这很难说.

This almost certainly has nothing to do with Spring, but without more information, it's hard to tell.

这篇关于应用程序在jdbcTemplate中随机挂起以进行更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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