I want to improve the performance of this update query because when it takes a lot of time to execute:
Qry = "update tab 1 set cDate = GetDate () where correct ('000000000000' + in_num, 12) = '" & amp; InvNo.PadLeft (12, "0") & amp; "'And (total-amount) << Balance and cd is empty"
Why are force-padding in_num
and InvNo
with major 0s with you:
correct ('000000000000' + in_num , 12) = InvNo.PadLeft (12, "0")
This will prevent any index from being used in in_num
.
Comments
Post a Comment