Home > database >  DB2 perform UPDATE statement super slow
DB2 perform UPDATE statement super slow

Time:09-26

The UPDATE TABLE1 t1 SET (t1) bdcdyh, t1. Ywh)=(. Select t2 bdcdyh, t2 ywh from table2 t2 where t1. Yxtbh=t2. Yxtbh and t2. ZDDM is not null) where t1. Yxtbh in (select t3. Yxtbh from table3 t3 where t3. Bdcdyh is not null and t3. ZDDM is not null and t3. Ywh is not null and t3. QXDM='123456')
This statement is about 10 w the amount of data, but perform three hours are not to come out, have a great god know how to solve it, help!

CodePudding user response:

Table indexed with associated, directly according to the query conditions fast query result set

CodePudding user response:

See any lock waits, latch wait for,

CodePudding user response:

Can try 1, bdcdyh of table3 ZDDM, ywh, table2 yxtbh, ZDDM related fields to create indexes; 2, the query statement added other filtering query condition; 3, the partition between many times for the update,

CodePudding user response:

Where did you perform statement? Into the server, it is better to block the indexed indexed

CodePudding user response:

To check, will have the wrong number,
  •  Tags:  
  • DB2
  • Related