user89749
user89749

Reputation: 301

Application hangs up randomly in jdbcTemplate for update

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

Transaction timeout is taking place.

Any suggestions?

Upvotes: 3

Views: 2201

Answers (1)

skaffman
skaffman

Reputation: 403611

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.

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

Upvotes: 4

Related Questions