update tbl_message set area=b.area from tbl_message a,tbl_hlrarea b where
b.hlr=substring(a.hlr,1,10)
...全文
716打赏收藏
又是一个优化问题,各位老大看看有什么好方法
有表一tbl_message,表二tbl_hlrarea 其中表一100万条记录,表二3万条记录 我现在要根据表二对表一进行更新操作,在表二中建有索引(hrl上) 下面这条语句会执行很慢,各位有没有好的写法。 update tbl_message set area=b.area from tbl_message a,tbl_hlrarea b where b.hlr=substring(a.hlr,1,10)